eolymp
Problems

Делится ли на 11?

published at 12/28/16, 2:03:53 pm

Классная задача , побольше бы таких!

published at 2/23/19, 9:25:09 am

https://www.e-olymp.com/uk/submissions/5094804 Скажіть що я не врахував

published at 12/19/21, 11:28:18 am

include<iostream>

include<cmath>

include<cstdlib>

using namespace std; int main() { string s; cin>>s; int sp=0 , sn=0; int n=s.size(); for (int i=0;i<n;i++) { int x=s[i]-48; if(i%2==0) sp=sp+x; else sn=sn+x; } if ((sp-sn)%11==0) cout<<"Yes"<<endl; else cout<<"No"<<endl;

} c++