結果

問題 No.236 鴛鴦茶
ユーザー r6eve
提出日時 2017-08-16 13:38:29
言語 OCaml
(5.2.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 21,704 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 00:20:55
合計ジャッジ時間 1,227 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

let () =
  let a, b, x, y = Scanf.scanf "%d %d %d %d " (fun a b x y -> a, b, x, y) in
  let c = a + b in
  let s = float (x * c) /. (float a) in
  let t = float (y * c) /. (float b) in
  Printf.printf "%.7f\n" (if s <= float (x + y) then s else t)
0