結果

問題 No.410 出会い
ユーザー nCk_cvnCk_cv
提出日時 2016-08-27 15:46:25
言語 Java19
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 2,320 ms
コンパイル使用メモリ 71,704 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2023-09-10 20:05:54
合計ジャッジ時間 6,411 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,840 KB
testcase_01 AC 129 ms
55,920 KB
testcase_02 AC 129 ms
55,668 KB
testcase_03 AC 128 ms
55,500 KB
testcase_04 AC 129 ms
55,864 KB
testcase_05 AC 128 ms
55,512 KB
testcase_06 AC 130 ms
55,872 KB
testcase_07 AC 130 ms
55,592 KB
testcase_08 AC 125 ms
55,736 KB
testcase_09 AC 126 ms
55,804 KB
testcase_10 AC 128 ms
55,704 KB
testcase_11 AC 128 ms
55,772 KB
testcase_12 AC 127 ms
55,968 KB
testcase_13 AC 128 ms
55,560 KB
testcase_14 AC 127 ms
55,460 KB
testcase_15 AC 130 ms
55,484 KB
testcase_16 AC 129 ms
56,048 KB
testcase_17 AC 128 ms
55,724 KB
testcase_18 AC 128 ms
55,656 KB
testcase_19 AC 128 ms
55,912 KB
testcase_20 AC 129 ms
55,712 KB
testcase_21 AC 126 ms
55,716 KB
testcase_22 AC 126 ms
55,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			int Px = sc.nextInt();
			int Py = sc.nextInt();
			int Qx = sc.nextInt();
			int Qy = sc.nextInt();
			
			double PQx = (Px + Qx) / 2.0;
			double PQy = (Py + Qy) / 2.0;
			
			double t = Math.abs(Px - PQx) + Math.abs(Py - PQy);
			
			System.out.printf("%.20f\n",t);
			
		}
}
0