UKE自动机 @ 2017-11-05 11:03:40
#include<cstdio>
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
for(int yi=100;yi<=999;yi++){
for(int er=100;er<=999;er++){
for(int san=100;san<=999;san++){
if(yi/a==er/b==san/c&&(yi/100+yi/10%10+yi%10+er/100+er/10%10+er%10+san/100+san/10%10+san%10)==45)cout<<yi<<" "<<er<<" "<<san<<" "<<endl;
}
}
}
cout<<"No!!!";
return 0;
}
一个跑了5505ms且有点错的代码
by 一飞冲天xqc @ 2017-11-30 21:01:51
#include<iostream>
using namespace std;
int main()
{
cout<<"192 384 576"<<"\n"<<"219 438 657"<<"\n"<<"273 546 819"<<"\n"<<"327 654 981";
return 0 } 这都20分