結果

問題 No.236 鴛鴦茶
ユーザー Shawn stayC
提出日時 2020-06-27 11:05:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 1,750 ms
コンパイル使用メモリ 166,208 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 09:00:10
合計ジャッジ時間 2,502 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
	int a,b,x,y; cin>>a>>b>>x>>y;
	if(a==b) cout<< min(x,y)*2 <<endl;
	else if(a>b) cout<<fixed<<setprecision(12)<< x+(double)x*a/b <<endl;
	else cout<<fixed<<setprecision(12)<< y+(double)y*a/b <<endl;
}
0