結果
問題 |
No.414 衝動
|
ユーザー |
|
提出日時 | 2024-05-19 12:11:49 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 347 bytes |
コンパイル時間 | 404 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 110,132 KB |
最終ジャッジ日時 | 2024-12-20 16:56:24 |
合計ジャッジ時間 | 23,030 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 RE * 1 TLE * 9 |
ソースコード
def prime_factors(N): d = [] for i in range(2, N + 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)