Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- cicles = int(input())
- first_day = float(input())
- total = first_day
- for i in range(cicles):
- percent = int(input()) / 100
- first_day *= (1 + percent)
- total += first_day
- if total >= 1000:
- print(f"You've done a great job running {math.ceil(total - 1000)} more kilometers!")
- else:
- print(f"Sorry Mrs. Ivanova, you need to run {math.ceil(1000 - total)} more kilometers")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement