文章
67
粉丝
207
获赞
29
访问
39.8k
while True:
try:
str = input()
array = list(str)
line = [0]*10
for i in range(0,len(array)):
if str[i]=='0':
line[0] = line[0] + 1
elif str[i]=='1':
line[1] = line[1] + 1
elif str[i]=='2':
line[2] = line[2] + 1
elif str[i]=='3':
line[3] = line[3] + 1
elif str[i]=='4':
line[4] = line[4] + 1
elif str[i]=='5':
line[5] = line[5] + 1
elif str[i]=='6':
line[6] = line[6] + 1
elif str[i]=='7':
line[7] = line[7] + 1
elif str[i]=='8':
line[8] = line[8] + 1
elif str[i]=='9':
line[9] = line[9] + 1
max = line[0]
maxindex = 0
for i in range(1 ,10):
if(max < line[i]):
max = line[i]
maxindex = i
print(maxindex)
except:
break
...
登录后发布评论
暂无评论,来抢沙发