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++;
}
}
}
随机推荐
- php 学习笔记 数组3
15.使用数组 1).并集(union) array_merge(array1,array2,array3..) 函数把两个或多个数组合并为一个数组,后面覆盖前面 2). 交集(intersecti ...
- 基于FPGA的DW8051移植(二)
基于上一篇博文继续,本来想换到oc8051,但是还是不甘心,弄了这么久还是没有弄出来,真是打击屎了. 上一篇说3f进入了operation code所以判断是代码错误,后来发现不可以这么判断. 因为地 ...
- 用 Python 测试框架简化测试
用 Python 测试框架简化测试 摘要:本文将向您介绍了三种流行 Python 测试框架(zope.testing,py.test,nose)的基本特性,并讨论新一代的测试风格. 最近出现了行业级的 ...
- WeCenter 社交化问答社区程序 | WeCenter 是一款知识型的社交化问答社区程序,专注于社区内容的整理、归类、检索和再发行
WeCenter 社交化问答社区程序 | WeCenter 是一款知识型的社交化问答社区程序,专注于社区内容的整理.归类.检索和再发行 为什么选择 WeCenter 程序? 让您的社区更智能地运作,强 ...
- 网页制作之JavaScript部分3--事件及事件传输方式(函数调用 练习题 )重要---持续更新中
一. 事件:说白了就是调用函数的一种方式.它包括:事件源.事件数据.事件处理程序. JS事件 1.js事件通常和函数结合来使用,这样可以通过发生的事件来驱动函数的执行,从而引起html出现不同的效果. ...
- BZOJ 3438: 小M的作物( 最小割 )
orz出题人云神... 放上官方题解... 转成最小割然后建图跑最大流就行了... ---------------------------------------------------------- ...
- Android:创建文件或文件夹以及获取sd卡根目录
目录结构: 功能,可以根据录入的目录或者文件夹生成相应的文件或者文件夹 首先需要添加一个权限: <uses-permission android:name="android.permi ...
- GitLab 之 Linux十分钟快装
原文链接:http://www.cnblogs.com/highsea90/p/5191340.html 先把 Shell 命令贴出来,楼主以 CentOS release 6.5 (Final) 6 ...
- [置顶] 搭建apache+tomcat+memcached集群环境
一.搭建apache server服务器 1.apache server图示:(加载图片要一张一张,所以可以到下面网站下载带图片的word) http://download.csdn.net/user ...
- 黑龙江省第七届大学生程序设计竞赛-Heap
描述 A heap is a full binary tree; for each node, its key is greater than its two sub-node’s key. Two ...