結果

問題 No.365 ジェンガソート
ユーザー Leonardone
提出日時 2016-05-01 00:27:38
言語 Lua
(LuaJit 2.1.1734355927)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 01:58:50
合計ジャッジ時間 1,928 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

-- yukicoder My Practice
-- author: Leonardone @ NEETSDKASU

n = io.read()

gi = io.read():gmatch('%d+')

mx = 0
ans = 0

for i = 1, n do
	v = tonumber(gi())
	mx = math.max(v, mx)
	if v > ans and v < mx then
		ans = v
	end
end

print(ans)
0