Advertisement
Spocoman

Three brothers

Oct 9th, 2023 (edited)
830
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. from math import ceil
  2.  
  3. first_time = float(input())
  4. second_time = float(input())
  5. third_time = float(input())
  6. father_time = float(input())
  7.  
  8. cleaning_time = 1 / (1 / first_time + 1 / second_time + 1 / third_time) * 1.15;
  9.  
  10. print(f"Cleaning time: {cleaning_time:.2f}")
  11. if father_time - cleaning_time > 0:
  12.     print(f"Yes, there is a surprise - time left -> {int(father_time - cleaning_time)} hours.")
  13. else:
  14.     print(f"No, there isn't a surprise - shortage of time -> {ceil(cleaning_time - father_time)} hours.")
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement