. . 高精度取摸 . . 队友代码
#include <bits/stdc++.h> struct BigInt { const static int mod = 10000; const static int DLEN = 4; const static int POW = 10000; int a[2500002], len; BigInt() { memset(a, 0, sizeof(a)); len = 1; } BigInt(const char s[]) { memset(a,0,sizeof(a)); int L = strlen(s); len = L / DLEN; if (L%DLEN) len++; int index = 0; for (int i = L -1; i >=0; i-=DLEN) { int t = 0; int k = i - DLEN + 1; if (k<0) k = 0; for (int j = k; j <= i; j++) { t = t * 10 + s[j] - '0'; } a[index++] = t; } } int operator %(const int b) const { int i, d = 0; for (i = len - 1; i >= 0; i--) { d = ((d*(POW))%b+a[i]) %b; } return d; } }; BigInt a; char buf[10000010]; int main() { int t = 0; while (~scanf("%s", buf)) { a = buf; printf("Case #%d: ", ++t); if (a%73 == 0 && a % 137 == 0) { puts("YES"); } else { puts("NO"); } } }