結果
問題 | No.312 置換処理 |
ユーザー |
👑 |
提出日時 | 2019-04-21 13:36:19 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 256 bytes |
コンパイル時間 | 126 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 12:27:13 |
合計ジャッジ時間 | 1,371 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 45 |
ソースコード
local n = io.read("*n")local max = math.ceil(math.sqrt(n))local found = falsefor i = 3, max doif(n % i == 0) thenprint(i)found = truebreakendendif(not found) thenif(n % 2 == 0 and 4 < n) then print(n / 2) else print(n) endend