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,k,i,j,m; while(scanf("%d",&n)!=EOF) { while(n--) { scanf("%d",&k); j=0;m=k; while(m--) { scanf("%d",&i); j+=i; } printf("%d\n",j-k+1); } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator