= A Stone Game = http://acm.timus.ru/problem.aspx?space=1&num=1180 {{{#!cplusplus /*Written by czk*/ #include #include int main() { char c; int i = 0; while(scanf("%c", &c) != EOF) { if(isdigit(c)) { i += c-'0'; } } if(i%3==0) printf("2"); else printf("1\n%d", i%3); } }}} {{{#!cplusplus /*Written by czk*/ #include #include using namespace std; int main() { char c; int i = 0; while(cin >> c) { if(isdigit(c)) { i += c-'0'; } } if(i%3==0) cout << '2'; else cout <<"1\n" << i%3; } }}}