알고리즘

[알고리즘] 백준 13985 - Equality (C++)

blueberrysoda 2024. 12. 10. 22:36

[문제 링크] : https://www.acmicpc.net/problem/13985

#include <iostream>
using namespace std;

char Arr[10];

int main(){
    cin.getline(Arr, 10);

    if((Arr[0] - '0') + (Arr[4] - '0') == (Arr[8] - '0')){
        cout << "YES\n";
    }
    else{
        cout << "NO\n";
    }
    return 0;
}