結果

問題 No.410 出会い
ユーザー jin128jin128
提出日時 2016-08-27 17:53:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 2,198 ms
コンパイル使用メモリ 71,968 KB
実行使用メモリ 56,460 KB
最終ジャッジ日時 2023-09-10 20:05:41
合計ジャッジ時間 6,637 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
56,172 KB
testcase_01 AC 133 ms
56,128 KB
testcase_02 AC 133 ms
55,772 KB
testcase_03 AC 133 ms
56,132 KB
testcase_04 AC 134 ms
55,888 KB
testcase_05 AC 134 ms
56,268 KB
testcase_06 AC 134 ms
56,188 KB
testcase_07 AC 134 ms
56,144 KB
testcase_08 AC 135 ms
55,792 KB
testcase_09 AC 134 ms
56,048 KB
testcase_10 AC 134 ms
56,156 KB
testcase_11 AC 134 ms
55,880 KB
testcase_12 AC 134 ms
55,896 KB
testcase_13 AC 134 ms
56,072 KB
testcase_14 AC 137 ms
56,156 KB
testcase_15 AC 136 ms
56,120 KB
testcase_16 AC 136 ms
56,316 KB
testcase_17 AC 137 ms
55,820 KB
testcase_18 AC 139 ms
55,672 KB
testcase_19 AC 136 ms
56,460 KB
testcase_20 AC 136 ms
56,148 KB
testcase_21 AC 136 ms
55,776 KB
testcase_22 AC 136 ms
55,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class S20_encounter{
  public static void main(String[] args){
    double ax, ay, bx, by;
    double time = 0;
    Scanner scn = new Scanner(System.in);

    ax = scn.nextDouble();
    ay = scn.nextDouble();
    bx = scn.nextDouble();
    by = scn.nextDouble();

    time += Math.abs(ax - bx)/2;
    time += Math.abs(ay - by)/2;

    System.out.println(time);
  }
}
0