Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- needed_hours = int(input())
- days_for_work = int(input())
- number_extra_workers = int(input())
- hours_for_work = (days_for_work - (days_for_work * 0.1)) * 8
- hours_for_extra_work = number_extra_workers * 2 * days_for_work
- total_hours = hours_for_work + hours_for_extra_work
- if total_hours >= needed_hours:
- remain_hours = total_hours - needed_hours
- print(f'Yes!{remain_hours:.0f} hours left.')
- else:
- missing_hours = needed_hours - total_hours
- print(f'Not enough time!{math.ceil(missing_hours)} hours needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement