| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 75168 | 闫译文 | 【J】T1 | C++ | 通过 | 100 | 21 MS | 1132 KB | 784 | 2026-06-21 14:49:27 |
#include <bits/stdc++.h> using namespace std; int T; int main() { //20 分做法 - 直接判断输入 x 是否为 2023 倍数 /* cin >> T; for(int i = 0; i < T; i++) { long long n; cin >> n; if(n % 2023 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } } */ //100 分做法 cin >> T; for(int i = 0; i < T; i++) { string x; cin >> x; int res = 0; for(int j = 0; j < x.length(); j++) { res = (res * 10 + x[j] - '0') % 2023; /* 以 x = 2023 为例,j 的四次遍历 res 结果分别为: 2 20 202 0 */ } if(res) //res 结果不为 0,不是倍数 { cout << "No" << endl; } else { cout << "Yes" << endl; } } return 0; }