結果
問題 |
No.300 平方数
|
ユーザー |
![]() |
提出日時 | 2017-06-22 18:23:10 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 107 ms / 1,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 414 ms |
コンパイル使用メモリ | 7,076 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-02 12:20:04 |
合計ジャッジ時間 | 2,505 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
from collections import Counter x = int(raw_input()) l = [] while x % 2 == 0: l.append(2) x /= 2 d = 3 while x >= d * d: if x % d == 0: l.append(d) x /= d else: d += 2 l.append(x) c = Counter(l) a = 1 for k,v in c.items(): if v % 2 == 1: a *= k print a