Advertisement
snowden_web

marafon | 12

Jun 28th, 2020
1,134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. n = int(input())
  2. min_d = n % 10
  3. cnt = 1
  4.  
  5. while n > 0:
  6.     digit = n % 10
  7.     if digit < min_d:
  8.         min_d = digit
  9.         cnt = 1
  10.     elif digit == min_d:
  11.         cnt += 1
  12.     n //= 10
  13.  
  14. print(cnt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement