Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m, n = map(int, input().split())
- s, c, d = '1', 0, 2**n
- for i in range(2, m+1, 1):
- s += str(i)
- if (len(s) >= n):
- s = s[(len(s)-n):]
- if int(s) % d == 0:
- c += 1
- print(c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement