零和一 Zeros and Ones

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=242&page=show_problem&problem=3215 [PDF](https://uva.onlinejudge.org/external/120/p12063.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12063/850f11f0403733445ab747fdf317b4f1b0dd502c.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12063/38092bc33f9090a3faac823e4200573864190839.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12063/b8b03be26062b775d3fc6e6510cca5ffa9f41ddb.png)

输入输出样例

输入样例 #1

5
6 3
6 4
6 2
26 3
64 2

输出样例 #1

Case 1: 1
Case 2: 3
Case 3: 6
Case 4: 1662453
Case 5: 465428353255261088