竞赛
考级
zsy
a,b,c = map(int,input().split()) num = [] for i in range(1000 , 10000): if i % a ==0 and (i+1) % b == 0 and (i+2) % c == 0 : num.append(i) if num: print(max(num)) else: print('Impossible')
WZA
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; for(int x=9999;x>=1000;x--){ if((x%a0)&&((x+1)%b0)&&((x+2)%c==0)){ cout<<x<<endl; return 0; } } cout<<"Impossible"; return 0; }
LS_YZY