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

更加数学的解法。。

Posted by suncongbo at 2017-07-12 16:01:52 on Problem 3086
In Reply To:纯数学解法... Posted by:jmf at 2010-01-24 18:52:14
/*******************
*poj.org Prob. 3086*
*Author: Congbo SUN*
*******************/

#include<cstdio>
using namespace std;

int main()
{
	int t,i,n;
	long long ans;
	
	scanf("%d",&t);
	for(i=1; i<=t; i++)
	{
		scanf("%d",&n);
		ans = ((long long)n*(n+1)*(n+2)*(n+3))/8;
		printf("%d %d %d\n",i,n,ans);
	}
	
	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