結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-30 20:51:46 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 177 bytes |
| コンパイル時間 | 1,305 ms |
| コンパイル使用メモリ | 158,588 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-21 19:24:26 |
| 合計ジャッジ時間 | 2,121 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:25: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int’ [-Wformat=]
6 | if(x/a*b <= y) printf("%f", x+x/a*b);
| ~^ ~~~~~~~
| | |
| | int
| double
| %d
main.cpp:8:15: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int’ [-Wformat=]
8 | else printf("%f", y+y/b*a);
| ~^ ~~~~~~~
| | |
| | int
| double
| %d
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int x, y, a, b;
cin >> x >> y >> a >> b;
if(x/a*b <= y) printf("%f", x+x/a*b);
else printf("%f", y+y/b*a);
return 0;
}