結果

問題 No.410 出会い
ユーザー yagi2yagi2
提出日時 2017-04-17 10:30:27
言語 Java19
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 460 bytes
コンパイル時間 3,130 ms
コンパイル使用メモリ 71,932 KB
実行使用メモリ 55,496 KB
最終ジャッジ日時 2023-09-10 20:17:01
合計ジャッジ時間 6,103 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,284 KB
testcase_01 AC 120 ms
55,412 KB
testcase_02 AC 118 ms
55,300 KB
testcase_03 AC 120 ms
55,440 KB
testcase_04 AC 118 ms
55,344 KB
testcase_05 AC 118 ms
55,244 KB
testcase_06 AC 121 ms
55,268 KB
testcase_07 AC 122 ms
55,256 KB
testcase_08 AC 122 ms
55,480 KB
testcase_09 AC 122 ms
55,460 KB
testcase_10 AC 122 ms
55,152 KB
testcase_11 AC 123 ms
55,496 KB
testcase_12 AC 120 ms
55,244 KB
testcase_13 AC 121 ms
55,076 KB
testcase_14 AC 123 ms
55,260 KB
testcase_15 AC 121 ms
55,484 KB
testcase_16 AC 120 ms
55,252 KB
testcase_17 AC 122 ms
55,336 KB
testcase_18 AC 121 ms
55,484 KB
testcase_19 AC 122 ms
55,348 KB
testcase_20 AC 122 ms
55,424 KB
testcase_21 AC 124 ms
55,252 KB
testcase_22 AC 119 ms
55,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int Px = Integer.parseInt(sc.next());
        int Py = Integer.parseInt(sc.next());
        int Qx = Integer.parseInt(sc.next());
        int Qy = Integer.parseInt(sc.next());

        int mannX = Math.abs(Px - Qx);
        int manhY = Math.abs(Py - Qy);
        System.out.println((mannX + manhY) / 2.0);
    }
}
0