Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import count
- x, e = map(int, input().split())
- sum = x
- for i in count(2):
- sum += i * x ** i
- if sum > e:
- break
- print(sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement