結果
| 問題 |
No.300 平方数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-12 16:12:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 302 bytes |
| コンパイル時間 | 1,870 ms |
| コンパイル使用メモリ | 193,196 KB |
| 最終ジャッジ日時 | 2025-01-07 11:44:43 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 TLE * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll x;
cin>>x;
ll y=1;
for (ll i=2;1<x;i++) {
int cnt=0;
while (x%i==0) {
x/=i;
cnt++;
}
if (cnt%2!=0) y*=i;
}
cout<<y<<endl;
return 0;
}