Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119530 | 常钰杰 | 猜数字 | C++ | Accepted | 6 MS | 268 KB | 563 | 2025-05-17 17:56:11 |
#include "bits/stdc++.h" using namespace std; int main() { int s; cin >> s; for(int i = 1;i <= s;i++) { int flag = 0; int a,b,c; cin >> a >> b >> c; for(int x = 1000;x <= 9999;x++) { if((x % a == 0) && ((x+1) % b == 0) && ((x+2) % c == 0)) { cout << x <<endl; flag = 1; break; } } if(flag == 0) { cout << "Impossible" <<endl; } } return 0; }