测试点全过(自测)
但全wa
题目网址
#include<bits/stdc++.h>
using namespace std;
bool pf(int x){
if(x<4) return false;
for(int i=1;i*i<=x;i++){
if(x%i==0&&x==i*i) return true;
}
return false;
}
bool erwei(int x){
int a,b,c;
a=x%100;
b=x/10%10;
c=x/100;
if(a==b||a==c||b==c) return true;
return false;
}
int main()
{
int n,cnt=0;
cin>>n;
for(int j=100;j<=999;j++){
if(pf(j)&&erwei(j)) cnt++;
if(cnt==n){
cout<<j;return 0;
}
}
return 0;
}