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

这样都WA,不是吧~~~

Posted by zqhappyboy7 at 2009-04-06 11:51:45 on Problem 3086
#include<stdio.h>
#define MAX 500
int main(){
	long t[MAX]={0},w[MAX]={0},i,runs;
	for(i=0;i<MAX-10;i++){
		t[i]=t[i-1]+i;
	}
	for(i=0;i<MAX-10;i++){
		w[i]=w[i-1]+i*t[i+1];
	}
	scanf("%ld",&runs);
	for(i=0;i<runs;i++){
		long num;
		scanf("%ld",&num);
		printf("%ld %ld %ld\n",i+1,num,w[num]);
	}
}	

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