結果

問題 No.159 刺さらないUSB
ユーザー くれちー
提出日時 2016-08-09 13:44:09
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 188 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 23:59:10
合計ジャッジ時間 833 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%lf %lf", &p, &q);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main() {
	double p, q, p1, p2;

	scanf("%lf %lf", &p, &q);

	p1 = (1 - p)*q;
	p2 = p*(1 - q)*q;
	
	if (p1 < p2) printf("YES\n");
	else printf("NO\n");

	return 0;
}
0