📜  我可以将 python 代码转换为 C++ 吗? - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:52.331000             🧑  作者: Mango

代码示例1
list=[200500,999508,10003,204090,9876987]
index_list=[]
for i in list:
  n=0
  i=str(i)
  
  for j in range(len(i)-3):
    if i[j]==str(0):
      if i[j]==i[j+1]==i[j+2]==i[j+3]:
        n+=4
      elif i[j]==i[j+1]==i[j+2]:
         n+=3
      elif i[j]==i[j+1]:
        n+=2
  index_list.append(n)