結果

問題 No.410 出会い
ユーザー kenji_shioyakenji_shioya
提出日時 2016-10-23 00:07:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 339 bytes
コンパイル時間 3,590 ms
コンパイル使用メモリ 71,484 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2023-09-10 20:12:55
合計ジャッジ時間 7,266 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,340 KB
testcase_01 AC 130 ms
55,512 KB
testcase_02 AC 127 ms
56,048 KB
testcase_03 AC 126 ms
55,656 KB
testcase_04 AC 125 ms
55,444 KB
testcase_05 AC 126 ms
55,312 KB
testcase_06 AC 127 ms
55,240 KB
testcase_07 AC 127 ms
55,428 KB
testcase_08 AC 126 ms
55,432 KB
testcase_09 AC 126 ms
55,572 KB
testcase_10 AC 127 ms
55,388 KB
testcase_11 AC 125 ms
55,604 KB
testcase_12 AC 126 ms
55,596 KB
testcase_13 AC 128 ms
55,440 KB
testcase_14 AC 128 ms
55,600 KB
testcase_15 AC 125 ms
55,436 KB
testcase_16 AC 127 ms
55,652 KB
testcase_17 AC 127 ms
55,500 KB
testcase_18 AC 129 ms
55,544 KB
testcase_19 AC 127 ms
55,544 KB
testcase_20 AC 126 ms
55,512 KB
testcase_21 AC 128 ms
55,432 KB
testcase_22 AC 127 ms
55,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise157 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int pX = sc.nextInt();
    int pY = sc.nextInt();
    int qX = sc.nextInt();
    int qY = sc.nextInt();

    int sum = Math.abs(pX - qX) + Math.abs(pY - qY);
    System.out.println((double)sum / 2);
  }
}
0