Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118337 | 马珺宇 | 猜数字 | C++ | Accepted | 6 MS | 268 KB | 353 | 2025-04-27 20:10:40 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,x=0; cin>>d; for(int i=1;i<=d;i++){ x=0; cin>>a>>b>>c; for(int i=1000;i<=9999;i++){ if(i%a==0&&(i+1)%b==0&&(i+2)%c==0){ x=i; break; } } if(x){ cout<<x<<endl; }else{ cout<<"Impossible"<<endl; } } return 0; }