Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil
- count_days = int(input())
- count_km_first_day = float(input())
- check_count_days = count_days
- total_km = count_km_first_day
- total = count_km_first_day
- while check_count_days:
- percent_up = int(input())
- percent = percent_up / 100
- total_km = total_km + total_km * percent
- total += total_km
- # print(total_km)
- # print(total)
- check_count_days -= 1
- total = round(ceil(total))
- if total >= 1000:
- print(f"You've done a great job running {(total - 1000)} more kilometers!")
- elif total < 1000:
- print(f"Sorry Mrs. Ivanova, you need to run {(1000 - total)} more kilometers")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement