Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: The3e
Problemset: บาร์โค้ด
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-03 19:27:33
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < 12; i++) {
sum += (s[i] - '0') * (1 + (i % 2) * 2);
}
if ((sum + s[12] - '0') % 10 == 0) {
cout << "YES";
}
else {
cout << "NO";
}
return 0;
}