Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: sulinx

Problemset: บาร์โค้ด

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-20 22:42:11

#include <bits/stdc++.h>

using namespace std;

int main(){
    string bc;
    cin >> bc;
    int a = bc[11] + bc[9] + bc[7] + bc[5] + bc[3] + bc[1] - (48*6);
    int b = bc[10] + bc[8] + bc[6] + bc[4] + bc[2] + bc[0] - (48*6);
    
    if((a*3 + b + bc[12] - 48)%10 == 0){
        cout << "YES";
    }else{
        cout << "NO";
    }
}