結果
問題 | No.1372 Median of Submasks |
ユーザー |
👑 |
提出日時 | 2021-03-07 22:21:10 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 7,072 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 06:13:57 |
合計ジャッジ時間 | 1,370 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
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 n = lltonumber(io.read()) local ret = 0LL local mul = 1LL while 0LL < n do if n % 2LL == 1LL then ret = mul end mul = mul * 2LL n = n / 2LL end ret = tostring(ret):gsub("LL", "") print(ret)