結果
| 問題 | No.300 平方数 |
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-03-21 19:53:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 1,000 ms |
| コード長 | 391 bytes |
| 記録 | |
| コンパイル時間 | 2,104 ms |
| コンパイル使用メモリ | 193,220 KB |
| 最終ジャッジ日時 | 2025-01-09 09:26:31 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
#include<bits/stdc++.h>
using lint=long long;
int main(){
std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
lint n;std::cin>>n;
lint ans=1;
for(lint i=2;i*i<=n;i++){
if(n%i)continue;
lint j=0;
for(;n%i==0;n/=i)j++;
if(j%2)ans*=i;
}
std::cout<<ans*n<<'\n';
}
ngtkana