結果

問題 No.236 鴛鴦茶
ユーザー hanorverhanorver
提出日時 2015-11-06 21:31:45
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 62,012 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 13:10:54
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<iomanip>
int main(){
    int a, b, x, y;
    std::cin >> a >> b>> x >> y;

    std::cout << std::setprecision(10);
    if(x * (a + b) / a <= x + y){
        std::cout << x * (a + b) / static_cast<double>(a) << std::endl;
    }else{
        std::cout << y * (a + b) / static_cast<double>(b) << std::endl;
    }

    return 0;
}
0