Submission
Status:
[-SSSSSSSSS]
Subtask/Task Score:
{0/100}
Score: 0
User: Bentley
Problemset: บาร์โค้ด
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-08 22:00:06
#include <bits/stdc++.h>
using namespace std;
int main()
{
string code; cin >> code;
int ans=0;
for(int i=0;i<12;i++){
if(i%2==0){
ans+=char(code[i])-48;
}
else{
ans+=3*(char(code[i])-48);
}
}
ans+=char(code[12])-48;
if(ans%10==0){
cout << "Yes";
}
else{
cout << "No";
}
return 0;
}