Advertisement
Spocoman

Happy Cat Parking

Jan 9th, 2022
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. days = int(input())
  2. hours = int(input())
  3. total = 0
  4.  
  5. for day in range(1, days + 1):
  6.     day_sum = 0
  7.     for hour in range(1, hours + 1):
  8.         if day % 2 == 0 and hour % 2 == 1:
  9.             day_sum += 2.50
  10.         elif day % 2 == 1 and hour % 2 == 0:
  11.             day_sum += 1.25
  12.         else:
  13.             day_sum += 1
  14.  
  15.     print(f'Day: {day} - {day_sum:.2f} leva')
  16.     total += day_sum
  17.  
  18. print(f'Total: {total:.2f} leva')
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement