結果
| 問題 |
No.63 ポッキーゲーム
|
| コンテスト | |
| ユーザー |
nobigomu
|
| 提出日時 | 2018-03-03 14:06:24 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 245 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 7,076 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 08:40:59 |
| 合計ジャッジ時間 | 1,298 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 3 |
ソースコード
function calc(l, k)
local i0, f0 = math.modf(l / k)
local i1, f1 = math.modf(i0 / 2)
if f0 == 0 then i1 = i1 - 1 end
if f1 ~= 0 then i1 = i1 + 1 end
return i1 * k
end
local l, k = io.stdin:read("*n"), io.stdin:read("*n")
print(calc(l, k))
nobigomu