Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k, n, w = map(int, input().split())
- sm = 0 #суммарная стоимость бананов
- for i in range(1, w + 1):
- sm += i * k
- if sm > n:
- print(sm - n)
- else:
- print(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement