Harry Potter and the Hide Story

Time Limit: 5000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 3988
64-bit integer IO format: %I64d      Java class name: Main

Description

iSea is tired of writing the story of Harry Potter, so, lucky you, solving the following problem is enough.

Input

The first line contains a single integer T, indicating the number of test cases.
Each test case contains two integers, N and K.

Technical Specification

1. 1 <= T <= 500
2. 1 <= K <= 1 000 000 000 000 00
3. 1 <= N <= 1 000 000 000 000 000 000

Output

For each test case, output the case number first, then the answer, if the answer is bigger than 9 223 372 036 854 775 807, output “inf” (without quote).

Sample Input

2
2 2
10 10

Sample Output

Case 1: 1
Case 2: 2

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .