Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: GoofyGooner6767
Problemset: บาร์โค้ด
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-29 13:07:09
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
string x;
int odd=0,even=0,result=0;
cin >> x;
result=x[12]-'0';
for(int i=1;i<13;i++){
if(i%2==0){
even+=x[i-1]-'0';
}else{
odd+=x[i-1]-'0';
}
}
even*=3;
result+=(even+odd);
if(result%10==0){
cout << "YES";
}else{
cout << "NO";
}
}