Untitled
unknown
plain_text
3 years ago
282 B
5
Indexable
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
int a, b;
a = N / 1000;
b = N % 1000;
int S1, S2;
S1 = a % 10 + (a / 10) % 10 + a / 100;
S2 = a % 10 + (a / 10) % 10 + a / 100;
if (S1 == S2)
cout << "YES";
else cout << "NO";
}Editor is loading...