求助
:

程序
#include<bits/stdc++.h>
using namespace std; using LL=unsigned long long;
bool f(LL n)
{
for(LL X=1,x;X*X<=n;X++){x=X*X; if(x==n) return 1;}
return 0;
}
int main()
{
ios::sync_with_stdio(false); cin.tie(0); LL n; cin>>n;
for(LL x=0;x<n;x++) if(f(x*n)) return cout<<x,0;
return 0;
}