Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: NaNjoyer

Problemset: บาร์โค้ด

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-05 21:38:24

#include<bits/stdc++.h>
using namespace std;
#define Take cin>>
#define take >>
#define Say cout<<
#define say <<
#define N endl
#define nonnegative unsigned
#define break break;
#define continue continue;

int main() {
    string barcode;
    Take barcode;
    reverse(barcode.begin(), barcode.end());
    int sum = 0;
    for (int i = 1 ; i < 13 ; i += 2) {
        sum += barcode[i] * 3;
    }
    for (int i = 2 ; i < 13 ; i += 2) {
        sum += barcode[i];
    }
    sum += barcode[0];
    if (sum % 10 == 0) Say "YES";
    else Say "NO";
return 0;}