結果
問題 | No.300 平方数 |
ユーザー |
![]() |
提出日時 | 2023-12-31 19:22:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 1,000 ms |
コード長 | 472 bytes |
コンパイル時間 | 208 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 60,860 KB |
最終ジャッジ日時 | 2024-09-27 17:11:29 |
合計ジャッジ時間 | 3,517 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
import collectionsdef prime_factorize(n):a = []while n % 2 == 0:a.append(2)n //= 2f = 3while f * f <= n:if n % f == 0:a.append(f)n //= felse:f += 2if n != 1:a.append(n)return adef n_fact(N):c = collections.Counter(prime_factorize(N))return cx = int(input())ans = 1for k,v in n_fact(x).items():if v % 2 == 1:ans *= kprint(ans)