結果

問題 No.410 出会い
ユーザー jimano
提出日時 2018-01-21 12:33:44
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 364 bytes
コンパイル時間 3,616 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 41,488 KB
最終ジャッジ日時 2024-06-28 11:28:30
合計ジャッジ時間 7,828 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.util.Scanner;

public class No0410 {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int[] p = { sc.nextInt(), sc.nextInt() };
			int[] q = { sc.nextInt(), sc.nextInt() };

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