結果
| 問題 |
No.453 製薬会社
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-04 04:43:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 660 ms |
| コンパイル使用メモリ | 62,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 19:38:19 |
| 合計ジャッジ時間 | 1,210 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 9 |
ソースコード
#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;
}
if (d >= c * 5 / 2) {
cout << setprecision(20) << c * 7 / 2 * 2000 << "\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;
}