結果

問題 No.365 ジェンガソート
ユーザー Leonardone
提出日時 2016-05-01 06:12:20
言語 Lua
(LuaJit 2.1.1734355927)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 54 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 01:59:17
合計ジャッジ時間 1,808 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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())
	if v > mx then
		mx = v
	elseif v > ans and v < mx then
		ans = v
	end
end

print(ans)
0