Advertisement
Guest User

Untitled

a guest
May 26th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. import sys
  2. import math
  3.  
  4. # Auto-generated code below aims at helping you parse
  5. # the standard input according to the problem statement.
  6.  
  7. n = int(input())
  8. print(n,file=sys.stderr)
  9. percentage = int(input())
  10. print(percentage,file=sys.stderr)
  11. bills = 0
  12. tips = 0
  13. for i in range(n):
  14.     bill, tip = [float(j) for j in input().split()]
  15.     print(bill,tip,file=sys.stderr)
  16.     bills+=bill
  17.     tips +=tip
  18. print("Total",file=sys.stderr)
  19. print(bills,tips,file=sys.stderr)
  20. print(bills/tips,file=sys.stderr)
  21. if bills/tips>=percentage:
  22.     print("DRUNK")
  23. else:
  24.     print("THIRSTY")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement