﻿ Fuzhou University OnlineJudge ﻿
Problem 1992 An Easy Problem

## Problem Description

Trust me, this problem is easy.

In mathematics, “MOD” operation is common. C = A (MOD B), which means that the remainder of A after divided by B is equal to that of C. It’s an easy problem to test whether A and C satisfy the condition above. But what you are expected to is not so easy! You will be given A and C and to find the number of B who satisfies the condition (equation) above, you could assume that A is not equal to C in this problem.

## Input

The first line is one integer T indicates the number of the test cases. (T <= 30)

Then for every case, the first line has two integers A and C. (1 <= A, C <= 10^9, A is not equal to C)

## Output

Output one line.

First output “Case idx: ”, here idx is the case number count from 1.

Then output the number of B who satisfies the condition (equation) above.

3 4 2 2 4 9 3

## Sample Output

Case 1: 2 Case 2: 2 Case 3: 4

## Source

FOJ有奖月赛-2010年12月

Submit  Back  Status  Discuss
﻿