結果
| 問題 | 
                            No.236 鴛鴦茶
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-05-30 20:51:06 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 202 bytes | 
| コンパイル時間 | 1,308 ms | 
| コンパイル使用メモリ | 157,008 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-21 19:24:24 | 
| 合計ジャッジ時間 | 2,031 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 2 | 
| other | WA * 23 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:10: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int’ [-Wformat=]
    7 | printf("%f", x+x/a*b);
      |         ~^   ~~~~~~~
      |          |    |
      |          |    int
      |          double
      |         %d
main.cpp:10:10: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int’ [-Wformat=]
   10 | 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);
return 0;
} else {
printf("%f", y+y/b*a);
return 0;
}
return 1;
}