3012. Coins (V)

单点时限: 2.0 sec

内存限制: 256 MB

In a strange shop, it never looks for a change and refuses to sell at a higher price, that is mean you have to pay the exact money for it. But you only now what you buy cost is no more than $n$.

Now, you want to know the minmum coins you should bring with. The value of coin can be any positive integers.

输入格式

Input starts with an integer $T$ $(T \le 200~000)$, denoting the number of test cases.

Each test case has an integer $n$ ($1 \le n \le 2~147~483~647$) in a single line.

输出格式

For each case, print the case number and the result.

样例

Input
3
1
2
5
Output
Case 1: 1
Case 2: 2
Case 3: 3

27 人解决,36 人已尝试。

39 份提交通过,共有 86 份提交。

4.3 EMB 奖励。

创建: 10 年,8 月前.

修改: 6 年,7 月前.

最后提交: 7 月,2 周前.

来源: Coins 系列

题目标签