結果

問題 No.236 鴛鴦茶
ユーザー nak2yoshi
提出日時 2016-02-24 13:28:45
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 2,587 ms
コンパイル使用メモリ 152,576 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 03:03:41
合計ジャッジ時間 3,375 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm;

void main()
{
    auto input = readln.split.to!(real[]);
    auto A = input[0], B = input[1], X = input[2], Y = input[3];

    auto rate = min(A, B) / max(A, B);
    auto few  = min(max(X, Y) * rate, min(X, Y));
    auto many = few * max(A, B) / min(A, B);
    "%.15s".writefln(few + many);
}
0