Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: cheraim
Problemset: บาร์โค้ด
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-03 19:13:51
#include <iostream>
using namespace std;
int main()
{
long long int barcode;
cin>>barcode;
int odd=0;
int even=0;
for(int i =13;i>0;i--){
odd+=barcode%10;
barcode/=10;
i--;
even+=barcode%10;
barcode/=10;
}
even=even*3;
even+=odd;
if(even%10==0) cout<<"YES";
else cout<<"NO";
}