結果

問題 No.410 出会い
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-10 21:18:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 2,052 ms
コンパイル使用メモリ 71,444 KB
実行使用メモリ 56,268 KB
最終ジャッジ日時 2023-09-10 20:22:53
合計ジャッジ時間 5,861 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,948 KB
testcase_01 AC 121 ms
55,824 KB
testcase_02 AC 122 ms
56,268 KB
testcase_03 AC 123 ms
55,872 KB
testcase_04 AC 123 ms
55,928 KB
testcase_05 AC 124 ms
56,016 KB
testcase_06 AC 124 ms
55,772 KB
testcase_07 AC 122 ms
55,728 KB
testcase_08 AC 122 ms
56,184 KB
testcase_09 AC 123 ms
56,200 KB
testcase_10 AC 123 ms
56,024 KB
testcase_11 AC 121 ms
55,492 KB
testcase_12 AC 124 ms
55,888 KB
testcase_13 AC 130 ms
55,532 KB
testcase_14 AC 130 ms
55,744 KB
testcase_15 AC 122 ms
55,864 KB
testcase_16 AC 128 ms
55,820 KB
testcase_17 AC 122 ms
56,024 KB
testcase_18 AC 121 ms
55,680 KB
testcase_19 AC 123 ms
55,972 KB
testcase_20 AC 122 ms
55,984 KB
testcase_21 AC 121 ms
55,824 KB
testcase_22 AC 126 ms
56,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
		double ans = (Math.abs(x2-x1)+Math.abs(y2-y1))/(double)2;
		System.out.println(ans);
	}
}
0