Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: prepremier
Problemset: บาร์โค้ด
Language: cpp
Time: 0.003 second
Submitted On: 2026-05-18 15:52:19
#include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
int ans1 = 0,ans2 = 0;
cin >> a;
for(int i = 0;i < 13;i++)
{
if(i%2 == 0)
{
ans1 += a[i] - '0';
}
else
{
ans2 += a[i] - '0';
}
}
if((ans2*3 + ans1)%10 == 0)
{
cout << "YES";
}
else
{
cout << "NO";
}
}