Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
161104 格林老师 猜数字 C++ Accepted 13 MS 276 KB 441 2026-09-30 15:34:38

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { long long C; cin>>C; while(C--){ long long a,b,c; cin>>a>>b>>c; bool f=1; for (int i=1000;i<10000;i++){ if (i%a==0 && (i+1)%b==0 && (i+2)%c==0){ cout<<i<<endl; f=0; break; } } if (f) cout<<"Impossible"<<endl; } return 0; }