|
|
back to boardПОЧЕМУ??? WHY??? W.A. 1 Posted by DeDaRm 17 Dec 2013 17:37 #include <iostream> using namespace std; int main() { int a,b,c; cin >> a; b=a-1; c=a+1; if (a%10+(a/10)%10+(a/100)%10==(a/1000)%10+(a/10000)%10+(a/100000)%10 || b%10+(b/10)%10+(b/100)%10==(b/1000)%10+(b/10000)%10+(b/100000)%10 || c%10+(c/10)%10+(c/100)%10==(c/1000)%10+(c/10000)%10+(c/100000)%10) cout << "YES"; else { cout << "NO"; } return 0; } |
|
|