Advertisement
GroZnik81

1233

Dec 17th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  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 total_money >= monney_need:
  22. print(f"Bravo! You can go to Disneyland and you will have {total_money}lv. for souvenirs.")
  23. else:
  24. total_money = total_money * -1
  25. print(f"Sorry. You need {total_money:.02f}lv. more.")
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement