結果
問題 |
No.159 刺さらないUSB
|
ユーザー |
![]() |
提出日時 | 2015-05-15 17:51:32 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 190 bytes |
コンパイル時間 | 204 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 03:58:25 |
合計ジャッジ時間 | 876 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 12 WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:17: warning: format ‘%f’ expects argument of type ‘float *’, but argument 2 has type ‘double *’ [-Wformat=] 6 | scanf("%f %f", &p, &q); | ~^ ~~ | | | | | double * | float * | %lf main.c:6:20: warning: format ‘%f’ expects argument of type ‘float *’, but argument 3 has type ‘double *’ [-Wformat=] 6 | scanf("%f %f", &p, &q); | ~^ ~~ | | | | float * double * | %lf main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%f %f", &p, &q); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { double p, q, P1, P2; scanf("%f %f", &p, &q); P1 = q * (1 - p); P2 = p * (1 - q) * q; printf("%s\n", P1 < P2 ? "YES" : "NO"); return 0; }