Submission
Status:
[-SSSSSSSSS]
Subtask/Task Score:
{0/100}
Score: 0
User: Athens
Problemset: บาร์โค้ด
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-27 11:06:48
#include <bits/stdc++.h>
using namespace std;
int main(){
string num;
cin >> num;
int s = num.length();
int score1 = 0;
int score2 = 0;
int check = num[12] - '0';
for(int i = 0; i < s - 1 ; i++){
char n = num[i];
int g = n - '0';
if(i % 2 == 0){
score2 += g;
}else if(i % 2 == 1 && i != 0){
score1 += g;
}
}
score1 = score1 * 3;
if(score1 + score2 + check == 100){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
}