Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Jajxr_
Problemset: บาร์โค้ด
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-24 19:33:56
#include<iostream>
using namespace std;
int main(){
string bc;
cin>>bc;
int a = bc[11] + bc[9] + bc[7] + bc[5] + bc[3] + bc[1] - (48*6);
int b = bc[10] + bc[8] + bc[6] + bc[4] + bc[2] + bc[0] - (48*6);
a*=3;
if((a+b+bc[12]-'0')%10==0){
cout<<"YES";
}
else{
cout<<"NO";
}
}