結果
| 問題 | No.300 平方数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-18 15:44:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 1,000 ms |
| コード長 | 348 bytes |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 54,108 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 04:08:08 |
| 合計ジャッジ時間 | 2,480 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll x, ans = 1;
cin >> x;
for(ll i=2;i * i <= x;i++) {
int cnt = 0;
while(x % i == 0) {
x /= i;
cnt++;
}
if(cnt % 2)
ans *= i;
}
if(x > 1)
ans *= x;
cout << ans << endl;
}