1 条题解

  • 0
    @ 2024-4-13 18:00:27

    C++ :

    #include<stdio.h>
    #include<string.h>
    int main() {
      char s[200];
      while(scanf("%s", &s) == 1) {
        if(!strcmp(s, "0")) break;
        int m = 0;
        for(int i = 0; i < strlen(s); i++)
          m = (m*10+s[i]-'0')%17;
        printf("%d\n", m==0?1:0);
      }
      return 0;
    }
    
    

    信息

    ID
    183
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者