# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

It is time to show your performance on number theory. Why so late? Come to the point.

You are given an integer number **X** (**1 ≤ X ≤ 10 ^{6}**). You need to calculate

As the result can be very large, you should print the value modulo

The first line of the input contains one integer **t (1≤t≤100000)** — the number of test cases.
Each of next **t** lines contain one integer **X(1≤X≤1000000)**.

For every test case, output one integer in a separate line in the format **Case A: B** where **A** is the number of the test case starting from **1** and **B** is the desired output.

Input | Output |
---|---|

2 4 5 | Case 1: 2 Case 2: 1 |

100% Solution Ratio

Nasim_Ahmed71Earliest,

moursalinmeFastest, 0.1s

moursalinmeLightest, 6.8 MB

purpleShortest, 542B

Login to submit