#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; ll qwq=1; cin>>n; for(int i=2;i*i<=n;i++) { int num=0; while(n%i==0) { n/=i; num++; } if(num%2!=0) qwq*=i; } cout<<qwq*n; return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account