Advertisement
GeorgiLukanov87

vet_parking100/100

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