結果
問題 | No.300 平方数 |
ユーザー |
|
提出日時 | 2020-10-12 06:01:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 1,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 2,490 ms |
コンパイル使用メモリ | 192,796 KB |
最終ジャッジ日時 | 2025-01-15 06:50:32 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long int ll;int main(){cin.tie(nullptr);ios::sync_with_stdio(false);ll x; cin >> x;ll y=1;for(ll i=2;i*i<=x;i++){if(x%i==0){int cnt=0;while(x%i==0){x/=i;cnt++;}if(cnt%2)y*=i;}}cout << x*y << endl;}