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<iostream> #include<string> using namespace std; int main() { int d[10]; string str; int i; cin>>str; int len=str.size(); for(i=0;i<len;++i) { d[i]=str[i]-48; } while(cin>>str) { if(str=="#") break ; for(i=0;i<len;++i) { d[i]+=(str[i]-48); } } for(i=0;i<len;++i) { d[i]%=10; cout<<d[i]; } cout<<endl; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator