結果

問題 No.410 出会い
ユーザー ohagi_1182
提出日時 2017-10-13 12:30:11
言語 Java
(openjdk 23)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 1,983 ms
コンパイル使用メモリ 74,256 KB
実行使用メモリ 41,804 KB
最終ジャッジ日時 2024-06-28 11:26:17
合計ジャッジ時間 6,119 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

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