結果
問題 | No.1446 ハンバーグと納豆ごはん |
ユーザー |
👑 |
提出日時 | 2021-05-17 13:00:35 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 420 bytes |
コンパイル時間 | 267 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 11:16:18 |
合計ジャッジ時間 | 1,529 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
local ffi = require("ffi")local C = ffi.Cffi.cdef[[long long atoll(const char*);]]local function lltonumber(str)return C.atoll(str)enda, b, c, d = io.read():match("(%d+) (%d+) (%d+) (%d+)")a = lltonumber(a)b = lltonumber(b)c = lltonumber(c)d = lltonumber(d)if b < a thena, b = b, ac, d = d, cendlocal lim = (b - a) / (d + 1LL)local ret = a + limret = tostring(ret):gsub("LL", "")print(ret)