結果
問題 | No.236 鴛鴦茶 |
ユーザー |
|
提出日時 | 2020-04-07 22:11:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 603 ms |
コンパイル使用メモリ | 55,156 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-08 05:59:06 |
合計ジャッジ時間 | 1,303 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%lf %lf %lf %lf",&A,&B,&X,&Y); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> using namespace std; int main(){ double A,B,X,Y; scanf("%lf %lf %lf %lf",&A,&B,&X,&Y); if(X*B<=Y*A)printf("%.7lf\n",X*(1+B/A)); else printf("%.7lf\n",Y*(1+A/B)); return 0; }