Advertisement
simeonshopov

Cristams spirit

Jan 15th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. #!/usr/local/bin/python3.7
  2. # -*- coding: utf-8 -*import
  3.  
  4. quantity = int(input())
  5. days = int(input())
  6. ornament_set, tree_skirt, tree_garland, tree_lights = 2, 5, 3, 15
  7. spirit, budget = 0, 0
  8.  
  9. for i in range(1, days + 1):
  10.     if i % 11 == 0:
  11.         quantity += 2
  12.     if i % 2 == 0:
  13.         budget += ornament_set * quantity
  14.         spirit += 5
  15.     if i % 10 == 0:
  16.         spirit -= 20
  17.         budget += tree_skirt + tree_garland + tree_lights
  18.         if i == days:
  19.             spirit -= 30
  20.     if i % 5 == 0:
  21.         budget += tree_lights * quantity
  22.         spirit += 17
  23.         if i % 3 == 0:
  24.             spirit += 30
  25.     if i % 3 == 0:
  26.         budget += tree_skirt * quantity + tree_garland * quantity
  27.         spirit += 13
  28.  
  29.  
  30. print(f'Total cost: {budget}\nTotal spirit: {spirit}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement