Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Field

Problemset: บาร์โค้ด

Language: cpp

Time: 0.002 second

Submitted On: 2026-05-16 11:50:38

#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";
	}
	
	
}