結果

問題 No.159 刺さらないUSB
ユーザー RCCW
提出日時 2017-02-05 01:19:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 147 bytes
コンパイル時間 1,361 ms
コンパイル使用メモリ 156,888 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 06:25:06
合計ジャッジ時間 2,315 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 12 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:17: warning: format ‘%f’ expects argument of type ‘float*’, but argument 2 has type ‘double*’ [-Wformat=]
    7 |         scanf("%f%f",&p,&q);
      |                ~^    ~~
      |                 |    |
      |                 |    double*
      |                 float*
      |                %lf
main.cpp:7:19: warning: format ‘%f’ expects argument of type ‘float*’, but argument 3 has type ‘double*’ [-Wformat=]
    7 |         scanf("%f%f",&p,&q);
      |                  ~^     ~~
      |                   |     |
      |                   |     double*
      |                   float*
      |                  %lf
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%f%f",&p,&q);
      |         ~~~~~^~~~~~~~~~~~~~

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


int main(){
	double p,q;
	scanf("%f%f",&p,&q);
	puts((1-p)*q<p*(1-q)*q?"YES":"NO");
	return 0;
}


0