結果
問題 | No.312 置換処理 |
ユーザー |
![]() |
提出日時 | 2019-05-21 21:43:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 265 ms / 2,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 106 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-15 12:27:47 |
合計ジャッジ時間 | 6,666 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 45 |
ソースコード
n = int(input())p = 2pmax = int(n**0.5)num_list = []while p <= pmax:if n % p == 0:while n % p == 0:n //= pnum_list.append(p)p += 1if n != 1:num_list.append(n)if num_list[0] > 2:print(num_list[0])elif num_list[0] == 2:if num_list[1] == 2:if 3 in num_list:print(3)else:print(4)else:print(num_list[1])