結果

問題 No.410 出会い
ユーザー itezpaceitezpace
提出日時 2016-08-15 00:10:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 608 bytes
コンパイル時間 1,966 ms
コンパイル使用メモリ 71,400 KB
実行使用メモリ 49,236 KB
最終ジャッジ日時 2023-09-10 20:00:49
合計ジャッジ時間 4,090 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
48,784 KB
testcase_01 AC 41 ms
48,888 KB
testcase_02 AC 42 ms
48,804 KB
testcase_03 AC 41 ms
48,936 KB
testcase_04 AC 41 ms
48,804 KB
testcase_05 AC 41 ms
48,936 KB
testcase_06 AC 41 ms
48,936 KB
testcase_07 AC 43 ms
48,768 KB
testcase_08 AC 43 ms
48,892 KB
testcase_09 AC 41 ms
48,960 KB
testcase_10 AC 41 ms
48,812 KB
testcase_11 AC 42 ms
49,068 KB
testcase_12 AC 42 ms
48,756 KB
testcase_13 AC 42 ms
49,160 KB
testcase_14 AC 42 ms
49,236 KB
testcase_15 AC 41 ms
48,812 KB
testcase_16 AC 41 ms
48,852 KB
testcase_17 AC 41 ms
48,856 KB
testcase_18 AC 40 ms
46,856 KB
testcase_19 AC 41 ms
48,956 KB
testcase_20 AC 41 ms
48,816 KB
testcase_21 AC 41 ms
48,864 KB
testcase_22 AC 41 ms
48,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.lang.*;
import java.io.*;

class Yuki410{
  public static void main(String[] args)
  throws IOException {
    DataInputStream d=new DataInputStream(System.in);
    String s=d.readLine();
    String[] sa=s.split(" ");
    int x1,y1;
    x1=Integer.parseInt(sa[0]);
    y1=Integer.parseInt(sa[1]);
    String s2=d.readLine();
    String[] sa2=s2.split(" ");
    int x2,y2;
    x2=Integer.parseInt(sa2[0]);
    y2=Integer.parseInt(sa2[1]);
    int xa,ya;
    double za;
    xa=x1-x2;
    if(xa<0) xa*=-1;
    ya=y1-y2;
    if(ya<0) ya*=-1;
    za=xa+ya;
    za/=2;
    System.out.println(za);
  }
}
0