結果
問題 | No.1794 Continued Fraction |
ユーザー |
👑 |
提出日時 | 2021-12-31 19:47:05 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 252 bytes |
コンパイル時間 | 286 ms |
コンパイル使用メモリ | 5,504 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 22:03:43 |
合計ジャッジ時間 | 1,805 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
local mfl, mce = math.floor, math.ceillocal n, m = io.read("*n", "*n")local t = {}while true dolocal v = mfl(n / m)table.insert(t, v)if n % m == 0 thenbreakendlocal rem = n - m * vn, m = m, remendprint(table.concat(t, " "))