結果

問題 No.159 刺さらないUSB
ユーザー 184
提出日時 2015-03-01 23:33:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 337 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 52,428 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 00:41:20
合計ジャッジ時間 996 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:25: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         double p,q;scanf("%lf%lf",&p,&q);
      |                    ~~~~~^~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

//namaega184



int main(){
	double p,q;scanf("%lf%lf",&p,&q);
	double p1=(1.0-p)*q,p2=p*(1.0-q)*q;
	printf("%f,%f\n",p1,p2);
	if(p1<p2)printf("YES\n");
	else printf("NO\n");
	return 0;

}
0