Advertisement
Guest User

Untitled

a guest
May 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import math
  2.  
  3.  
  4. year =  input()
  5. p = int (input())#selebrations in year
  6. h = int (input()) #weekends in own town
  7.  
  8. weekends_year= 46
  9. weekends_sofia= (weekends_year * 3.0/4)
  10.  
  11. games_in_town = h
  12. games_in_sofia = p * 2.0/3
  13.  
  14. all= weekends_sofia + games_in_sofia+games_in_town
  15.  
  16. if year == "leap":
  17.     print(math.floor((15*all)/100)+ math.floor(all))
  18. else:
  19.     print(math.floor(all))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement