結果
| 問題 | 
                            No.236 鴛鴦茶
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tntan
                         | 
                    
| 提出日時 | 2015-12-14 04:47:57 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 751 bytes | 
| コンパイル時間 | 828 ms | 
| コンパイル使用メモリ | 87,928 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-15 12:11:24 | 
| 合計ジャッジ時間 | 1,559 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge6 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 19 WA * 4 | 
ソースコード
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cctype>
using namespace std;
typedef long long ll;
int main()
{
	double a, b, x, y;
	cin >> a >> b >> x >> y;
	if (a > b)
	{
		b /= a;
		cout << fixed << setprecision(10) << x*(1 + b) << endl;
	}
	else if (a < b)
	{
		a /= b;
		cout << fixed << setprecision(10) << y*(a + 1) << endl;
	}
	else
	{
		cout << min(x, y) * 2 << endl;
	}
	return 0;
}
            
            
            
        
            
tntan