Advertisement
Spocoman

11. HappyCat Parking

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