Submit | All submissions | Best solutions | Back to list |
PPAP - Pen Pine Apple - Apple Pen |
Kosaka wants to sing PPAP.
Given the number of Pens, Pineapples and Apples available, find the number of times he can sing "Pen Pineapple Apple Pen. Once he uses a Pen or a Pineapple or an Apple, he throws it away.
Input
The first line consists of an integer t, the number of test cases. Each test case is a single line with three integers n, p and a denoting the number of pens, pineapples and apples respectively.
Output
For each test case, print the number of times Kosaka can sing "Pen Pineapple Apple Pen"
Constraints
1 <= t <= 1000
1 <= n <= 10000
1 <= p <= 10000
1 <= a <= 10000
Example
Input 3 2 1 1 1000 1 1 5 3 7 Output: 1 1 2
Added by: | cegprakash |
Date: | 2016-10-21 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: MAWK BC BF NCSHARP COFFEE DART FORTH GOSU JULIA KTLN OCT PROLOG PYPY3 R RACKET SQLITE SWIFT UNLAMBDA |