fork download
  1. n=int(input())
  2. m=0
  3. while n>0:
  4. if n%10>m:
  5. m=n%10
  6. n=n//10
  7. print(m)
  8.  
Success #stdin #stdout 0.1s 14148KB
stdin
14356232
stdout
6