1 条题解
-
0
#include <iostream>//hetao3097453 using namespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,sum = 0; cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j >> k >> l >> m >> n >> o >> p >> q; a *= 7; b *= 9; c *= 10; d *= 5; e *= 8; f *= 4; g *= 2; h *= 1; i *= 6; j *= 3; k *= 7; l *= 9; m *= 10; n *= 5; o *= 8; p *= 4; q *= 2; sum += a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q; sum %= 11; if(sum == 0) { cout << 1 << endl; } else if(sum == 1) { cout << 0 << endl; } else if(sum == 2) { cout << "X" << endl; } else if(sum == 3) { cout << 9 << endl; } else if(sum == 4) { cout << 8 << endl; } else if(sum == 5) { cout << 7 << endl; } else if(sum == 6) { cout << 6 << endl; } else if(sum == 7) { cout << 5 << endl; } else if(sum == 8) { cout << 4 << endl; } else if(sum == 9) { cout << 3 << endl; } else if(sum == 10) { cout << 2 << endl; } return 0; }
- 1
信息
- ID
- 1024
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 2
- 标签
- 递交数
- 31
- 已通过
- 22
- 上传者