結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2018-05-01 20:28:41 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 255 bytes |
コンパイル時間 | 56 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 00:12:39 |
合計ジャッジ時間 | 966 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
local ffi = require 'ffi'local C = ffi.Cffi.cdef 'int scanf(const char *, ...);'print((function (cd, n)local r = 0for _=1,n do C.scanf("%d",cd) r = cd[0]%2==0 and r+1 or r-1 endreturn math.abs(r)end)(ffi.new("int32_t[1]"), io.stdin:read("*n")))