結果

問題 No.410 出会い
ユーザー samplelpmassamplelpmas
提出日時 2017-01-10 13:27:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 71,200 KB
実行使用メモリ 55,872 KB
最終ジャッジ日時 2023-09-10 20:14:51
合計ジャッジ時間 6,163 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,680 KB
testcase_01 AC 127 ms
55,376 KB
testcase_02 AC 128 ms
55,664 KB
testcase_03 AC 128 ms
55,676 KB
testcase_04 AC 128 ms
55,664 KB
testcase_05 AC 128 ms
55,724 KB
testcase_06 AC 128 ms
55,872 KB
testcase_07 AC 128 ms
55,732 KB
testcase_08 AC 125 ms
55,808 KB
testcase_09 AC 126 ms
55,612 KB
testcase_10 AC 126 ms
55,724 KB
testcase_11 AC 125 ms
55,664 KB
testcase_12 AC 127 ms
55,664 KB
testcase_13 AC 125 ms
55,616 KB
testcase_14 AC 127 ms
55,664 KB
testcase_15 AC 127 ms
55,576 KB
testcase_16 AC 129 ms
55,724 KB
testcase_17 AC 128 ms
55,616 KB
testcase_18 AC 127 ms
55,788 KB
testcase_19 AC 133 ms
55,684 KB
testcase_20 AC 128 ms
55,516 KB
testcase_21 AC 127 ms
55,524 KB
testcase_22 AC 129 ms
55,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    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();

        System.out.println((double) (Math.abs(px - qx)) / 2 + (double) (Math.abs(py - qy)) / 2);

    }

}
0