結果
問題 | No.414 衝動 |
ユーザー |
|
提出日時 | 2024-05-19 12:14:51 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 320 ms |
コンパイル使用メモリ | 81,872 KB |
実行使用メモリ | 64,808 KB |
最終ジャッジ日時 | 2024-12-20 16:56:41 |
合計ジャッジ時間 | 2,573 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 RE * 1 |
ソースコード
def prime_factors(N): d = [] for i in range(2, int(N ** 0.5) + 1): while N % i == 0: d.append(i) N //= i if N != 1: d.append(N) return d M = int(input()) pf = prime_factors(M) if len(pf) == 1: print(1, M) else: ans = 1 for i in range(1, len(pf)): ans *= pf[i] print(pf[0], ans)