結果
問題 | No.185 和風 |
ユーザー |
![]() |
提出日時 | 2018-04-21 17:09:11 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 34 ms |
コンパイル使用メモリ | 5,120 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 05:24:48 |
合計ジャッジ時間 | 516 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
print((function (f, n) local r=f() if r<=0 then return -1 end for i=2,n do r=f(r) if r<=0 then return -1 end end return r end)(function (n) local t = -io.stdin:read("*n")+io.stdin:read("*n") if n == nil then n = t end return n == t and n or -1 end, tonumber(io.stdin:read("*l"))))