fork(1) download
  1. import sys
  2. n = int(sys.stdin.readline())
  3. L = list(str(n))
  4. L = list(map(int, L))
  5. K = '0123456789'
  6. K = list(map(int,list(str(K))))
  7. S = [0]*len(K)
  8. for i in range(len(K)):
  9. S[i] = L.count(K[i])
  10. S[6] = int(round((S[6]+S[9])/2))
  11. print(max(S[0:9]))
  12.  
Success #stdin #stdout 0.02s 9324KB
stdin
66666
stdout
2