fork download
  1. n = abs(int(input()))
  2.  
  3. print(min(map(int, str(n))))
  4.  
  5. m = 9
  6.  
  7. while True:
  8. n, d = divmod(n, 10)
  9. m = min(m, d)
  10. if n == 0:
  11. break
  12.  
  13. print(m)
Success #stdin #stdout 0.03s 9816KB
stdin
2022
stdout
0
0