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