Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: solarsunny
Problemset: บาร์โค้ด
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-12 22:46:25
#include<bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string n;
cin >> n;
int sum=0;
for(int i=0; i<13; i++) {
int x = n[i]-'0';
if(i%2==1) {
sum = sum +x*2;
}
sum = sum + x;
}
if(sum%10 == 0) {
cout << "YES" << "\n";
} else {
cout << "NO" << "\n";
}
}