結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
37kt_
|
| 提出日時 | 2015-09-03 18:24:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 199 bytes |
| コンパイル時間 | 1,178 ms |
| コンパイル使用メモリ | 157,520 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-28 12:56:18 |
| 合計ジャッジ時間 | 1,939 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%lf %lf %lf %lf", &a, &b, &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
double a, b, x, y;
scanf("%lf %lf %lf %lf", &a, &b, &x, &y);
x = min(x, y * a / b);
y = min(y, x * b / a);
printf("%.20f\n", x + y);
}
37kt_