Poor drunk Waiter
Statement
The Waiter Niki daily works for a pittance. After a hard day, he wants to treat himself to a drink. But he can only afford that with a decent tip. So if he gets more than a certain percentage of the tip in total on one day that he can drink until he forgets the f*** job.
Input description
<<Line 1:>> An integer [[N]] for the number of tables he served.
<<Line 2:>> An integer [[percentage]] for the percentage of the bill he needs as tip to get drunk.
<<Next [[N]] lines:>> Two space-separated floats [[bill]] for the amount of the bill and [[tip]] for the amount of the tip.
Output description
The Waiter is drunk or not: {{ "DRUNK" }}/{{ "THIRSTY"}}.
Constraints
0 < [[N]] < 50
0 ≤ [[percentage]] , [[tip]] ≤ 100
0 ≤ [[bill]] ≤ 1000
Game modes
Fastest
Test cases
One table Test
Input
1
10
10 1
Output
DRUNK
Validator 1 Validator
Input
1
10
10 1
Output
DRUNK
One dissatisfied table Test
Input
1
20
15 1.5
Output
THIRSTY
Validator 2 Validator
Input
1
30
20 5
Output
THIRSTY
More tables Test
Input
4
15
15 4.50
80 10
5 0
10 2
Output
DRUNK
Validator 3 Validator
Input
4
15
15 4.50
80 8
5 0
10 2
Output
THIRSTY
Hard day Test
Input
8
12
50 5
69.69 7
25 3
9.99 1.01
5.45 0.6
36 4
1.20 1
99.90 14
Output
THIRSTY
Validator 4 Validator
Input
8
12
50 5
69.69 7
25 3
9.99 1.01
5.45 0.6
36 4
1.20 1
99.90 15
Output
DRUNK
Solution language
Solution
Stub generator input