結果
問題 |
No.410 出会い
|
ユーザー |
![]() |
提出日時 | 2016-11-12 22:31:42 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 205 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 21,632 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-25 21:39:16 |
合計ジャッジ時間 | 773 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 19 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:17: warning: format ‘%f’ expects argument of type ‘float *’, but argument 2 has type ‘double *’ [-Wformat=] 5 | scanf("%f%f%f%f", &px, &py, &qx, &qy); | ~^ ~~~ | | | | float * double * | %lf main.c:5:19: warning: format ‘%f’ expects argument of type ‘float *’, but argument 3 has type ‘double *’ [-Wformat=] 5 | scanf("%f%f%f%f", &px, &py, &qx, &qy); | ~^ ~~~ | | | | float * double * | %lf main.c:5:21: warning: format ‘%f’ expects argument of type ‘float *’, but argument 4 has type ‘double *’ [-Wformat=] 5 | scanf("%f%f%f%f", &px, &py, &qx, &qy); | ~^ ~~~ | | | | float * double * | %lf main.c:5:23: warning: format ‘%f’ expects argument of type ‘float *’, but argument 5 has type ‘double *’ [-Wformat=] 5 | scanf("%f%f%f%f", &px, &py, &qx, &qy); | ~^ ~~~ | | | | float * double * | %lf main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%f%f%f%f", &px, &py, &qx, &qy); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ double a, px, py, qx, qy; scanf("%f%f%f%f", &px, &py, &qx, &qy); a = ((px-qx+py-py)/2); if(a>0) printf("%f\n", a); else printf("%f\n", a *= -1); return 0; }