結果

問題 No.410 出会い
ユーザー YamaKasa
提出日時 2018-05-05 17:02:12
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 2,989 ms
コンパイル使用メモリ 74,228 KB
実行使用メモリ 41,740 KB
最終ジャッジ日時 2024-06-28 11:42:43
合計ジャッジ時間 5,765 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int Px = scan.nextInt();
		int Py = scan.nextInt();
		int Qx = scan.nextInt();
		int Qy = scan.nextInt();
		scan.close();
		int k1 = Px - Qx;
		int k2 = Py - Qy;
		if(k1 < 0) {
			k1 = - k1;
		}
		if(k2 < 0) {
			k2 = - k2;
		}

		double ans = (k1 + k2) / 2.0;
		System.out.println(ans);
	}
}
0