Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Poon

Problemset: บาร์โค้ด

Language: c

Time: 0.002 second

Submitted On: 2025-09-22 17:27:15

#include <stdio.h>
int main()
{
  char s[14];
  scanf("%s",s);
  int x[13];
  for(int k=0;k<13;k++)
  {
    x[k]=s[k]-'0';
  }
  if((3*(x[1]+x[3]+x[5]+x[7]+x[9]+x[11])+x[0]+x[2]+x[4]+x[6]+x[8]+x[10]+x[12])%10==0)
  {
    printf("YES");
  }
  else
  {
    printf("NO");
  }
}