結果
問題 |
No.300 平方数
|
ユーザー |
|
提出日時 | 2017-12-10 05:23:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 1,389 ms |
コンパイル使用メモリ | 158,580 KB |
実行使用メモリ | 13,644 KB |
最終ジャッジ日時 | 2024-11-30 07:35:52 |
合計ジャッジ時間 | 43,941 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 TLE * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(void) { ll x; cin >> x; ll ans = 1; for (ll i = 2; i <= x; i++) { if (x % i) continue; int cnt = 0; while (x % i == 0) { x /= i; cnt++; } if (cnt & 1) ans *= i; } cout << ans << endl; return 0; }