Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: chillxvtkz

Problemset: บาร์โค้ด

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-07 15:40:37

#include <bits/stdc++.h>
#define ll long long
#define ct cout << ' '
#define el cout << endl;
using namespace std;
const int mx = 1e9;
const int mn = -1e9;
ll n1,sum,se,so,s;
string n;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n;
    for(int i=1;i<=11;i=i+2){
        se = se+n[i]-'0';
    }
    for(int i=0;i<=11;i=i+2){
        so = so+n[i]-'0';
    }
    se = se*3;
    s=se+so;
    if((s+(n[12]-'0'))%10==0){
        cout << "YES";
    }
    else cout << "NO";
    return 0;
}