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 |
Re:我去 都显示不出来结果 为啥就ac了腻 求大神 orzIn Reply To:我去 都显示不出来结果 为啥就ac了腻 求大神 orz Posted by:ZAZUIMINGYUE at 2014-07-31 22:22:02 #include<stdio.h> #include<string.h> int main() { int len, i; char a[10]; int b[10]={0}; while( scanf("%s", a)!=EOF ) { len = strlen(a); for(i=0; i<len; i++) { b[i] += a[i] - '0'; } } for(i=0; i<len; i++) b[i] = b[i]%10; for(i=0; i<len; i++) printf("%d", b[i]); printf("\n"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator