Submit | All submissions | Best solutions | Back to list |
LRGST2 - Largest Multiple |
You are given two integers A and B. You have to find the largest multiple P of B such that P<=A.
Input
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case contains two integers A and B (1<=A, B<=3*1018 and A>=B)
Output
For each test case, print the case number and the required answer.
Sample Input/Output:
Sample Input |
Sample Output |
2 10 10 27 5 |
Case 1: 10 Case 2: 25 |
Problem Setter: Md Abdul Alim, Dept. of Computer Science, Bangladesh University of Business & Technology
Added by: | Alim |
Date: | 2014-03-04 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU |
Resource: | Own Problem |