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