Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/python3.7
- # -*- coding: utf-8 -*import
- quantity = int(input())
- days = int(input())
- ornament_set, tree_skirt, tree_garland, tree_lights = 2, 5, 3, 15
- spirit, budget = 0, 0
- for i in range(1, days + 1):
- if i % 11 == 0:
- quantity += 2
- if i % 2 == 0:
- budget += ornament_set * quantity
- spirit += 5
- if i % 10 == 0:
- spirit -= 20
- budget += tree_skirt + tree_garland + tree_lights
- if i == days:
- spirit -= 30
- if i % 5 == 0:
- budget += tree_lights * quantity
- spirit += 17
- if i % 3 == 0:
- spirit += 30
- if i % 3 == 0:
- budget += tree_skirt * quantity + tree_garland * quantity
- spirit += 13
- print(f'Total cost: {budget}\nTotal spirit: {spirit}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement