結果
問題 |
No.2647 [Cherry 6th Tune A] Wind
|
ユーザー |
👑 |
提出日時 | 2024-08-04 21:19:52 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 496 bytes |
コンパイル時間 | 333 ms |
コンパイル使用メモリ | 7,200 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-08-04 21:19:54 |
合計ジャッジ時間 | 1,673 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] local function lltonumber(str) return C.atoll(str) end local q = io.read("*n", "*l") for iq = 1, q do local d, a = io.read():match("(%d+) (%d+)") d = tonumber(d) a = lltonumber(a) local ha = a / 2LL local s = io.read() local t = {} for w in s:gmatch("%d+") do w = (ha + lltonumber(w)) / a w = tostring(w):gsub("LL", "") table.insert(t, w) end print(table.concat(t, " ")) end