結果
問題 |
No.410 出会い
|
ユーザー |
|
提出日時 | 2016-10-09 13:22:42 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 20:46:21 |
合計ジャッジ時間 | 850 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 19 |
コンパイルメッセージ
main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function ‘main’: main.c:5:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d%d%d%d",&Px,&Py,&Qx,&Qy); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> main() { int Px,Py,Qx,Qy,length; scanf("%d%d%d%d",&Px,&Py,&Qx,&Qy); if(Px>Qy){ length=Px-Qx; } else{ length=Qx-Px; } if(Py>Qy){ length+=Py-Qy; } else{ length+=Qy-Py; } printf("%d",length); return(0); }