結果
| 問題 |
No.300 平方数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-13 23:22:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 262 bytes |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,820 KB |
| 最終ジャッジ日時 | 2024-09-13 15:16:51 |
| 合計ジャッジ時間 | 3,926 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 TLE * 1 -- * 25 |
ソースコード
X = int(input())
res = 1
i = 2
cnt = 0
while X % i == 0:
X //= i
cnt += 1
if cnt % 2 == 1:
res *= i
i += 1
while X != 1:
cnt = 0
while X % i == 0:
X //= i
cnt += 1
if cnt % 2 == 1:
res *= i
i += 2
print(res)