| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
写了5分钟水过。。。。@@#include<stdio.h>
int main()
{
__int64 zero, one;
int Case, i, n, j;
//freopen("in", "r", stdin);
scanf("%d", &Case);
for(i = 0; i < Case; i++)
{
scanf("%d", &n);
zero = 1;
one = 1;
for(j = 2; j <= n; j++)
{
zero = one + zero;
one = zero - one;
}
printf("Scenario #%d:\n%ld\n\n", i+1, zero+one);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator