Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import math
- # Auto-generated code below aims at helping you parse
- # the standard input according to the problem statement.
- n = int(input())
- print(n,file=sys.stderr)
- percentage = int(input())
- print(percentage,file=sys.stderr)
- bills = 0
- tips = 0
- for i in range(n):
- bill, tip = [float(j) for j in input().split()]
- print(bill,tip,file=sys.stderr)
- bills+=bill
- tips +=tip
- print("Total",file=sys.stderr)
- print(bills,tips,file=sys.stderr)
- print(bills/tips,file=sys.stderr)
- if bills/tips>=percentage:
- print("DRUNK")
- else:
- print("THIRSTY")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement