Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

写了5分钟水过。。。。@@

Posted by galaxysf3 at 2011-06-28 17:32:44 on Problem 1953
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator