Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: FakeAnutin
Problemset: บาร์โค้ด
Language: cpp
Time: 0.002 second
Submitted On: 2026-09-25 23:40:35
#include <bits/stdc++.h>
using namespace std;
int main(){
string x; cin>>x;
reverse(x.begin(),x.end());
int s1=0,s2=0;
for(int i=1;i<=11;i+=2){
s1+=x[i]-'0';
}
s1*=3;
for(int i=2;i<=12;i+=2){
s2+=x[i]-'0';
}
int st = s1+s2;
st += x[0]-'0';
if(st%10==0){
cout<<"YES";
}else{
cout<<"NO";
}
}