結果
問題 |
No.410 出会い
|
ユーザー |
![]() |
提出日時 | 2017-03-23 15:45:25 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 125 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 28,032 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 20:37:38 |
合計ジャッジ時間 | 800 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 19 |
コンパイルメッセージ
main.c: In function 'main': main.c:5:14: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration] 5 | printf("%f",(abs(c-a)+abs(d-b))/2); | ^~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs' 1 | #include <stdio.h> +++ |+#include <stdlib.h> 2 | int main(){ main.c:5:19: warning: 'abs' argument 1 promotes to 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 5 | printf("%f",(abs(c-a)+abs(d-b))/2); | ~^~ <built-in>: note: built-in 'abs' declared here main.c:5:28: warning: 'abs' argument 1 promotes to 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 5 | printf("%f",(abs(c-a)+abs(d-b))/2); | ~^~ <built-in>: note: built-in 'abs' declared here
ソースコード
#include <stdio.h> int main(){ float a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); printf("%f",(abs(c-a)+abs(d-b))/2); return 0; }