結果

問題 No.236 鴛鴦茶
ユーザー nobigomu
提出日時 2018-04-21 16:52:06
言語 Lua
(LuaJit 2.1.1734355927)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 416 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 13:16:26
合計ジャッジ時間 904 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

print((function (f, g, a, b, x, y)
	return f(g(a,b,x,y))
end)(function (n)
	return (n==math.floor(n) and "%.0f" or "%.12f"):format(n)
end, function (a, b, x, y)
	a,b,x,y = tonumber(a),tonumber(b),tonumber(x),tonumber(y)
	if a>b then return x*b/a<y and x+x*b/a or y+y*a/b end
	if a<b then return y*a/b<x and y+y*a/b or x+x*b/a end
	return math.min(x,y)*2
end, io.stdin:read("*l"):match("(%d+)%s(%d+)%s(%d+)%s(%d+)")))
0