Advertisement
bl00dt3ars

04. Workout

Nov 22nd, 2020 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. import math
  2.  
  3. cicles = int(input())
  4. first_day = float(input())
  5. total = first_day
  6.  
  7. for i in range(cicles):
  8.     percent = int(input()) / 100
  9.     first_day *= (1 + percent)
  10.     total += first_day
  11.  
  12. if total >= 1000:
  13.     print(f"You've done a great job running {math.ceil(total - 1000)} more kilometers!")
  14. else:
  15.     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