For each bill you pay using CRED, you earn
CRED coins.At CodeChef store, each bag is worth
CRED coins.
Chef pays
number of bills using CRED. Find the maximum number of bags he can get from the CodeChef store.
Input Format
- First line will contain
- .
Output Format
For each test case, output in a single line - the maximum number of bags Chef can get from the CodeChef store.
Constraints
Subtasks
- Subtask 1 (100 points): Original constraints.
Sample Input 1
3
10 10
20 4
70 7
Sample Output 1
1
0
4
Explanation
Test Case
: For each bill payment, one receives CRED coins. Chef pays bills using CRED. Thus, he receives CRED coins. Chef can getbag from the CodeChef store using these coins.
Test Case
: For each bill payment, one receives CRED coins. Chef pays bills using CRED. Thus, he receivesCRED coins. Chef cannot get any bag from the CodeChef store using these coins.
Test Case
: For each bill payment, one receives CRED coins. Chef pays bills using CRED. Thus, he receives CRED coins. Chef can get at most bags from the CodeChef store using these coins.
No comments:
Post a Comment