Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
50404 jiabokai 练82.2 三连击 C++ 无测评数据 0 MS 0 KB 614 2024-08-21 19:56:20

Tests(0/0):


#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,n1,n2,n3,m[10]; bool f=false,f2=false; cin>>a>>b>>c; for(int i=1;i<=1000/c;i++){ n1=i*a; n2=i*b; n3=i*c; for(int j=1;j<=3;j++){ m[n1%10]++; n1/=10; } for(int j=1;j<=3;j++){ m[n2%10]++; n2/=10; } for(int j=1;j<=3;j++){ m[n3%10]++; n3/=10; } for(int j=1;j<=9;j++){ if(m[j]!=1){ f=true; break; } } if(!f){ cout<<i*a<<" "<<i*b<<" "<<i*c<<endl; f2=true; }else f=false; for(int j=1;j<=9;j++){ m[j]=0; } } if(!f2){ cout<<"No!!!"; } }