ZeroJudge & UVa Online Judge answers
#include #include using namespace std; int main() { string str="0"; int input; while(getline(cin,str)) { int sum=0; for(int i=0;i { sum += str[i]; sum = sum%3; } if(sum==0) cout<<"yes"< else cout<<"no"< } return 0; }
No comments:
Post a Comment