Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main(){
- int t;
- cin >> t;
- cin.ignore();
- while (t--) {
- string s;
- getline(cin, s);
- int a = (int)(s[0] - 48);
- int b = (int)(s[4] - 48);
- int c = (int)(s[8] - 48);
- if(a+b==c){
- cout << "YES" << endl;
- }else{
- cout << "NO" << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement