Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- n, a1, b, mx = map(int, input().split())
- exp = 1 - ((mx / a1 - 1) * (1 - b)) / b
- x = math.ceil(math.log(exp, b))
- if x > n:
- print(n)
- else:
- print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement