結果

問題 No.410 出会い
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-18 19:18:45
言語 Java19
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 1,841 ms
コンパイル使用メモリ 71,108 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-09-10 20:17:38
合計ジャッジ時間 5,716 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
56,148 KB
testcase_01 AC 121 ms
55,508 KB
testcase_02 AC 122 ms
55,604 KB
testcase_03 AC 122 ms
55,332 KB
testcase_04 AC 121 ms
55,696 KB
testcase_05 AC 121 ms
55,980 KB
testcase_06 AC 120 ms
55,540 KB
testcase_07 AC 120 ms
55,864 KB
testcase_08 AC 121 ms
55,812 KB
testcase_09 AC 120 ms
55,616 KB
testcase_10 AC 120 ms
55,508 KB
testcase_11 AC 121 ms
56,160 KB
testcase_12 AC 121 ms
56,068 KB
testcase_13 AC 121 ms
55,608 KB
testcase_14 AC 121 ms
55,580 KB
testcase_15 AC 120 ms
55,540 KB
testcase_16 AC 121 ms
55,608 KB
testcase_17 AC 120 ms
55,556 KB
testcase_18 AC 121 ms
55,604 KB
testcase_19 AC 120 ms
55,608 KB
testcase_20 AC 121 ms
56,204 KB
testcase_21 AC 115 ms
55,488 KB
testcase_22 AC 122 ms
55,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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 ans = Math.abs(px - (double)(px + qx) / (double)2) + Math.abs(py - (double)(py + qy) / (double)2);
    System.out.println(ans);
  }
}
0