0分求染点绿
查看原帖
0分求染点绿
1430495
litianrui0201楼主2025/1/14 00:23
#include<bits/stdc++.h>
using namespace std;
bool huiwen(string s){
	for(int i=0,j=s.length( )-1;i<j;i++,j--)if(s[i]!=s[j])return false;
	return true;
}
int main( ){
	int n,m;cin>>n>>m;

	for(int x=pow(10,n-1);x<pow(10,n);x++){
		for(int y=pow(10,m-1);y<pow(10,m);y++){
			int z=x*y;
			stringstream szzzfc;
			szzzfc<<z;
			string s;
			szzzfc>>s;
			if(huiwen(s)){
				cout<<x<<" "<<y<<endl;
				return 0;
			}
		}
	}
	
	return 0;
}
2025/1/14 00:23
加载中...