Python
看见这个题就想起来1017了,于是就用了python
1 n = input() 2 num = [0,0,0,0,0,0,0,0,0,0] 3 for i in range(10): 4 num[i] = n.count(str(i)) 5 for i in range(10): 6 if(num[i] != 0): 7 print("{}:{}".format(i,num[i]))
水水水!
看见这个题就想起来1017了,于是就用了python
1 n = input() 2 num = [0,0,0,0,0,0,0,0,0,0] 3 for i in range(10): 4 num[i] = n.count(str(i)) 5 for i in range(10): 6 if(num[i] != 0): 7 print("{}:{}".format(i,num[i]))
水水水!