結果

問題 No.236 鴛鴦茶
ユーザー Yug_min_null
提出日時 2021-11-11 01:25:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 1,870 ms
コンパイル使用メモリ 185,760 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 19:54:56
合計ジャッジ時間 2,799 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(){
  int A, B, X, Y; cin >> A >> B >> X >> Y;
  double ans = 0.0;
  if(A*Y >= B*X){
    ans = (double)X + (double)X*B/A;
  }else{
    ans = (double)Y + (double)Y*A/B;
  }
  cout << setprecision(10) << ans << endl;
}
0