結果

問題 No.410 出会い
ユーザー jimanojimano
提出日時 2018-01-21 12:30:40
言語 Java19
(openjdk 21)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 661 bytes
コンパイル時間 3,972 ms
コンパイル使用メモリ 71,660 KB
実行使用メモリ 49,660 KB
最終ジャッジ日時 2023-09-10 20:22:20
合計ジャッジ時間 5,524 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
47,296 KB
testcase_01 AC 42 ms
49,360 KB
testcase_02 AC 42 ms
49,444 KB
testcase_03 AC 42 ms
47,248 KB
testcase_04 AC 42 ms
49,276 KB
testcase_05 AC 43 ms
49,336 KB
testcase_06 AC 43 ms
49,272 KB
testcase_07 AC 42 ms
49,256 KB
testcase_08 AC 42 ms
49,396 KB
testcase_09 AC 43 ms
49,136 KB
testcase_10 AC 42 ms
49,212 KB
testcase_11 AC 42 ms
49,624 KB
testcase_12 AC 43 ms
49,592 KB
testcase_13 AC 42 ms
49,328 KB
testcase_14 AC 42 ms
49,276 KB
testcase_15 AC 43 ms
49,132 KB
testcase_16 AC 42 ms
49,228 KB
testcase_17 AC 42 ms
49,660 KB
testcase_18 AC 42 ms
49,264 KB
testcase_19 AC 43 ms
49,220 KB
testcase_20 AC 43 ms
49,244 KB
testcase_21 AC 45 ms
49,240 KB
testcase_22 AC 45 ms
49,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0410 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String[] str1 = br.readLine().split(" ");
			String[] str2 = br.readLine().split(" ");
			int[] p = { Integer.parseInt(str1[0]), Integer.parseInt(str1[1]) };
			int[] q = { Integer.parseInt(str2[0]), Integer.parseInt(str2[1]) };

			double dist = (Math.abs(p[0] - q[0]) + Math.abs(p[1] - q[1])) / 2.0;
			System.out.println(dist);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0