15 solutions
-
0
签到
#include<stdio.h> #include<math.h> #include<bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin>>n; ll ans = 1; for(int i = 2; i *i <= n; ++ i) { ll end = 0; while(n % i == 0) { end ++; n /= i; } if(end & 1)ans *= i; } ans *= n; cout<<ans<<endl; return 0; }
Information
- ID
- 189
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- # Submissions
- 493
- Accepted
- 91
- Uploaded By