Problem E
Number Sets
Note that this is an easier version of the problem numbersetshard.
You start with a sequence of consecutive integers. You want to group them into sets.
You are given the interval, and an integer
Then you consider each pair of integers in the interval. If
the two integers share a prime factor which is at least
How many different sets there will be at the end of this process?
Input
One line containing an integer
For each test case, there will be one line containing three
single-space-separated integers
You may assume that
Output
For each test case, output one line containing the string
"Case #
Sample Input 1 | Sample Output 1 |
---|---|
2 10 20 5 10 20 3 |
Case #1: 9 Case #2: 7 |