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