結果
| 問題 |
No.300 平方数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-02 16:23:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 314 bytes |
| コンパイル時間 | 203 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-05 08:08:48 |
| 合計ジャッジ時間 | 5,904 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 20 |
ソースコード
x = int(input())
d = {}
for i in range(2, int(x**0.5)+1):
while x % i == 0:
if not i in d:
d[i] = 1
else:
d[i] += 1
x //= i
if len(d) == 0:
print(x)
else:
y = 1
for k, v in d.items():
if int(v) % 2 != 0:
y *= int(k)
print(y)