# new_1va

Dec 17th, 2020
15
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. import math
2. monney_need = float(input())
3. months = int(input())
4. end_months_monney = 0
5. # current_monney = 0
6. total_money = 0
7. for every_month in range(1,months+1):
8. # end_months_monney += monney_need * 0.25
9. if every_month == 1:
10. end_months_monney += monney_need * 0.25
11. continue
12. if every_month % 3 == 0:
13. # end_months_monney += monney_need * 0.25
14. end_months_monney -= end_months_monney * 0.16
15. if every_month % 4 == 0:
16. # end_months_monney += monney_need * 0.25
17. end_months_monney += end_months_monney * 0.25
18. end_months_monney += monney_need * 0.25
19. total_money = end_months_monney - monney_need
20.
21. if end_months_monney >= monney_need:
22. # total_money = total_money * -1
23. print(f"Bravo! You can go to Disneyland and you will have {total_money:.2f}lv. for souvenirs.")
24. else:
25. print(f"Sorry. You need {abs(total_money):.2f}lv. more.")
26.
RAW Paste Data