Advertisement
CR7CR7

Firm

Feb 17th, 2021
1,025
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import math
  2. needed_hours = int(input())
  3. days_for_work = int(input())
  4. number_extra_workers = int(input())
  5.  
  6. hours_for_work = (days_for_work - (days_for_work * 0.1)) * 8
  7. hours_for_extra_work = number_extra_workers * 2 * days_for_work
  8. total_hours = hours_for_work + hours_for_extra_work
  9. if total_hours >= needed_hours:
  10.     remain_hours = total_hours - needed_hours
  11.     print(f'Yes!{remain_hours:.0f} hours left.')
  12. else:
  13.     missing_hours = needed_hours - total_hours
  14.     print(f'Not enough time!{math.ceil(missing_hours)} hours needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement