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 |
这程序到底哪里错了?为什么总通不过呢?#include <stdio.h> int main() { int N, n, w=0, T[301], i, j; scanf("%d", &N); for(i=0; i<=300; i++) T[i]=0; for(i=1; i<=300; i++) T[i]=i+T[i-1]; for(i=1; i<=N; i++) { scanf("%d", &n); for(j=1;j<=n;j++) w+=j*T[j+1]; printf("%d %d %d", i, n, w); w=0; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator