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(){ string str; cin>>str; while(str!="0"){ int i = str.size(); int j(0); for(int k=0;k<i;k++){ j = (j*10 + (str[k]-'0'))%9; } cout<<j<<endl; cin>>str; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator