Run ID:1016
提交时间:2023-06-17 17:21:28
#include<bits/stdc++.h> using namespace std; int last(int x) { for(int i=10;i<=32;i++) { if(i*i==x) { return 1; } } return 0; } int number(int x) { int a=x%10; int b=x%100/10; int c=x/100; if(a==c||b==c||a==b) { return 1; } else { return 0; } } int main() { int n; cin>>n; int i=1; for(int l=100;l<=999;l++) { if(last(l)==1&&number(l)==1) { if(i==n) { cout<<l<<endl; return 0; } else { i++; } } } return 0; }