結果

問題 No.410 出会い
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-13 12:30:11
言語 Java19
(openjdk 21)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 1,810 ms
コンパイル使用メモリ 71,540 KB
実行使用メモリ 57,556 KB
最終ジャッジ日時 2023-09-10 20:20:32
合計ジャッジ時間 6,038 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
56,196 KB
testcase_01 AC 130 ms
55,932 KB
testcase_02 AC 132 ms
54,488 KB
testcase_03 AC 130 ms
57,556 KB
testcase_04 AC 133 ms
56,040 KB
testcase_05 AC 132 ms
55,896 KB
testcase_06 AC 133 ms
56,548 KB
testcase_07 AC 134 ms
55,520 KB
testcase_08 AC 132 ms
56,588 KB
testcase_09 AC 132 ms
55,768 KB
testcase_10 AC 133 ms
55,808 KB
testcase_11 AC 134 ms
55,724 KB
testcase_12 AC 133 ms
56,524 KB
testcase_13 AC 139 ms
56,408 KB
testcase_14 AC 144 ms
55,900 KB
testcase_15 AC 144 ms
55,904 KB
testcase_16 AC 145 ms
56,024 KB
testcase_17 AC 146 ms
56,032 KB
testcase_18 AC 146 ms
55,816 KB
testcase_19 AC 134 ms
55,964 KB
testcase_20 AC 133 ms
55,512 KB
testcase_21 AC 134 ms
56,004 KB
testcase_22 AC 134 ms
55,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double px = sc.nextDouble(); double py = sc.nextDouble();
		double qx = sc.nextDouble(); double qy = sc.nextDouble();
		double ans = Math.abs(px - qx) + Math.abs(py - qy);
		System.out.println(ans / 2.0);
	}
}
0