Friends
Description
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
For each test case, the first line contains an integer $n$($0\leq n\leq 3000$), denoting the number of languages.
Output
Sample Input
0
2
Sample Output
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++;
}
}
}
随机推荐
- search_word
一个小程序,用asc码输出自己的名字.要求是,a~z两路输入,输出了一个完整的拼音之后还需要输出一个空格.—— 信息硬件过滤的雏形. module search_word ( clock , rese ...
- github过程中收集
github过程中收集 <HelloGithub月刊>第三期 <HelloGithub>第三期 兴趣是最好的老师,而<HelloGithub> 就是帮你找到兴趣 ...
- oschina数据库相关
数据库相关 110数据库服务器 233NoSQL数据库 18MySQL衍生版 6开源XML数据库 311数据库管理工具 117数据库调整和优化 274数据库驱动程序 41数据库建模
- Windows Azure 网站开发Stacks支持
编辑人员注释:本文章由 Windows Azure 网站团队的项目经理 Daria Grigoriu 和 Windows Azure 网站开发人员体验合作伙伴共同撰写. Windows Azure 网 ...
- HDU SPFA算法 Invitation Cards
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1535 分析: 题意:求1点到其它点的最短距离之和+其它点到1点的最短距离之和 前面一部分直接用SPFA ...
- CAN总线基础
can总线协议: 涵盖了OSI规定的传输层.数据链路层.物理层 物理层: 决定了位编码方式(NRZ编码,6个位插入填充位),位时序(位时序.位的采样).同步方式(根据同步段ss实现同步,并具有再同步功 ...
- 插件化—配置xml的辅助测试
1.xml文件,xml文件在res/xml目录下 <?xml version="1.0" encoding="utf-8"?> <infos& ...
- SQL查询重复记录、删除重复记录方法
查找所有重复标题的记录:SELECT * FROM t_info a WHERE ((SELECT COUNT(*) FROM t_info WHERE Title = a.Title) > 1 ...
- javascript获取页面各种高度
网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.body.offsetWi ...
- html+css实现图片的层布局
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...