Description

Mike has many friends. Here are nine of them: Alice, Bob, Carol, Dave, Eve, Frank, Gloria, Henry and Irene.

Mike is so skillful that he can master $n$ languages (aka. programming languages).

His nine friends are all weaker than he. The sets they can master are all subsets of Mike's languages.

But the relations between the nine friends is very complex. Here are some clues.

1. Alice is a nice girl, so her subset is a superset of Bob's. 
2. Bob is a naughty boy, so his subset is a superset of Carol's. 
3. Dave is a handsome boy, so his subset is a superset of Eve's. 
4. Eve is an evil girl, so her subset is a superset of Frank's. 
5. Gloria is a cute girl, so her subset is a superset of Henry's. 
6. Henry is a tall boy, so his subset is a superset of Irene's. 
7. Alice is a nice girl, so her subset is a superset of Eve's. 
8. Eve is an evil girl, so her subset is a superset of Carol's. 
9. Dave is a handsome boy, so his subset is a superset of Gloria's. 
10. Gloria is a cute girl, so her subset is a superset of Frank's. 
11. Gloria is a cute girl, so her subset is a superset of Bob's.

Now Mike wants to know, how many situations there might be.

 

Input

The first line contains an integer $T$($T \le 20$) denoting the number of test cases.

For each test case, the first line contains an integer $n$($0\leq n\leq 3000$), denoting the number of languages.

 

Output

For each test case, output ''Case #t:'' to represent this is the t-th case. And then output the answer. 
 

Sample Input

2
0
2
 

Sample Output

Case #1: 1
Case #2: 1024
 只要读懂题目就知道了
其实就是求32的n次方; 大数问题用Java是很方便的
 import java.math.BigInteger;
import java.util.Scanner;
public class Main{ public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int t=in.nextInt();
int cased=;
while(t-->){
int n=in.nextInt();
BigInteger b=new BigInteger("");
System.out.println("Case #"+cased+": "+b.pow(n).toString());
cased++;
}
}
}

随机推荐

  1. search_word

    一个小程序,用asc码输出自己的名字.要求是,a~z两路输入,输出了一个完整的拼音之后还需要输出一个空格.—— 信息硬件过滤的雏形. module search_word ( clock , rese ...

  2. github过程中收集

    github过程中收集 <HelloGithub月刊>第三期   <HelloGithub>第三期 兴趣是最好的老师,而<HelloGithub> 就是帮你找到兴趣 ...

  3. oschina数据库相关

    数据库相关 110数据库服务器 233NoSQL数据库 18MySQL衍生版 6开源XML数据库 311数据库管理工具 117数据库调整和优化 274数据库驱动程序 41数据库建模

  4. Windows Azure 网站开发Stacks支持

    编辑人员注释:本文章由 Windows Azure 网站团队的项目经理 Daria Grigoriu 和 Windows Azure 网站开发人员体验合作伙伴共同撰写. Windows Azure 网 ...

  5. HDU SPFA算法 Invitation Cards

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1535 分析: 题意:求1点到其它点的最短距离之和+其它点到1点的最短距离之和 前面一部分直接用SPFA ...

  6. CAN总线基础

    can总线协议: 涵盖了OSI规定的传输层.数据链路层.物理层 物理层: 决定了位编码方式(NRZ编码,6个位插入填充位),位时序(位时序.位的采样).同步方式(根据同步段ss实现同步,并具有再同步功 ...

  7. 插件化—配置xml的辅助测试

    1.xml文件,xml文件在res/xml目录下 <?xml version="1.0" encoding="utf-8"?> <infos& ...

  8. SQL查询重复记录、删除重复记录方法

    查找所有重复标题的记录:SELECT * FROM t_info a WHERE ((SELECT COUNT(*) FROM t_info WHERE Title = a.Title) > 1 ...

  9. javascript获取页面各种高度

    网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.body.offsetWi ...

  10. html+css实现图片的层布局

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...