fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. string s;
  5. getline(cin,s);
  6. int a = s[0]-'0';
  7. int b = s[4]-'0';
  8. int c = s[8] - '0';
  9. if(a + b == c)cout <<"YES";
  10. else cout << "NO";
  11. }
Success #stdin #stdout 0.01s 5296KB
stdin
Standard input is empty
stdout
NO