Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- obem = int(input())
- tr1 = int(input())
- tr2 = int(input())
- vreme = float(input())
- deb1 = tr1*vreme
- deb2 = tr2*vreme
- debit = deb1+deb2
- obemprocent = math.trunc((debit*100)/obem)
- tr1procent = math.trunc((deb1*100)/debit)
- tr2procent = math.trunc((deb2*100)/debit)
- obemplus = float(debit-obem)
- if obemplus< obem:
- print ("The pool is {0}% full. Pipe 1: {1}%. Pipe 2: {2}%.".format(round(obemprocent),round(tr1procent),round(tr2procent)))
- if obemplus>=obem:
- print ("For {0} hours the pool overflows with {1} liters.".format(vreme,obemplus))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement