0分求助
查看原帖
0分求助
551094
siyeansh楼主2022/7/9 21:46
#include<bits/stdc++.h>
using namespace std; 
int main(){
	for(int a=1;a<=9;a++){
		for(int b=a+1;b<=9;b++){
			for(int c=b+1;c<=9;c++){
				for(int d=1;d<=9;d++){
					for(int e=d+1;e<=9;e++){
						for(int f=e+1;f<=9;f++){
							for(int g=1;g<=9;g++){
								for(int h=g+1;h<=9;h++){
									for(int i=h+1;i<=9;i++){
										if((100*d+10*e+f)/(100*a+10*b+c)==2&&(100*g+10*h+i)/(100*a+10*b+c)==3){
											cout<<100*a+10*b+c<<' '<<100*d+10*e+f<<' '<<100*g+10*h+i<<endl;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
2022/7/9 21:46
加载中...