Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- day_off = int(input())
- day_work = 365 - day_off
- play_day_off = day_off * 127
- play_day_work = day_work * 63
- play_for_year = play_day_off + play_day_work
- if play_for_year <= 30000:
- hours = (30000 - play_for_year) // 60
- minutes = (30000 - play_for_year) % 60
- print(f"Tom sleeps well")
- print(f"{hours} hours and {minutes} minutes less for play")
- else:
- hours = (play_for_year - 30000) // 60
- minutes = (play_for_year - 30000) % 60
- print(f"Tom will run away")
- print(f"{hours} hours and {minutes} minutes more for play")
Advertisement
Add Comment
Please, Sign In to add comment