結果

問題 No.453 製薬会社
ユーザー olphe
提出日時 2016-12-04 04:41:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 61,660 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 19:38:17
合計ジャッジ時間 1,306 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "iostream"
#include "iomanip"
using namespace std;

long double c, d;
long double num;
long double ans;


int main() {
	cin >> c >> d;
	if (c >= d * 3) {
		cout << setprecision(20) << d * 4 * 1000<<"\n";
		return 0;
	}
	num = (d * 3 - c) * 7 / 13;
	ans = num * 2000;
	ans += (d - num * 5 / 7) * 4 * 1000;
	cout << setprecision(20) << ans << "\n";
	return 0;
}
0