Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
97126 李谨睿 猜数字 C++ Output Limit Exceeded 0 MS 196 KB 330 2024-11-10 13:18:22

Tests(0/1):


Code:

#include<stdio.h> int main() { int n,x,a,b,c; scanf("%d",&n); while(n--) { scanf("%d %d %d",&a,&b,&c); for(x=1000;x<=9999;x++){ if(x%a==0&&(x+1)%b==0&&(x+2)%c==0) break; if(x<9999) printf("%d\n",x); else printf("Impossible\n"); } } return 0; }