結果

問題 No.410 出会い
ユーザー GrenacheGrenache
提出日時 2016-08-12 22:23:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 1,585 bytes
コンパイル時間 3,868 ms
コンパイル使用メモリ 75,236 KB
実行使用メモリ 50,252 KB
最終ジャッジ日時 2023-09-10 19:49:46
合計ジャッジ時間 6,208 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
49,712 KB
testcase_01 AC 57 ms
49,680 KB
testcase_02 AC 57 ms
50,156 KB
testcase_03 AC 56 ms
49,660 KB
testcase_04 AC 56 ms
49,700 KB
testcase_05 AC 56 ms
49,764 KB
testcase_06 AC 55 ms
49,720 KB
testcase_07 AC 57 ms
49,700 KB
testcase_08 AC 56 ms
49,712 KB
testcase_09 AC 57 ms
49,792 KB
testcase_10 AC 56 ms
50,252 KB
testcase_11 AC 57 ms
49,788 KB
testcase_12 AC 57 ms
49,728 KB
testcase_13 AC 56 ms
50,208 KB
testcase_14 AC 57 ms
50,176 KB
testcase_15 AC 56 ms
49,720 KB
testcase_16 AC 55 ms
49,772 KB
testcase_17 AC 56 ms
49,792 KB
testcase_18 AC 55 ms
49,744 KB
testcase_19 AC 59 ms
50,164 KB
testcase_20 AC 57 ms
49,840 KB
testcase_21 AC 58 ms
49,760 KB
testcase_22 AC 55 ms
49,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder410 {

    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	Printer pr = new Printer(System.out);

    	int px = sc.nextInt();
    	int py = sc.nextInt();
    	int qx = sc.nextInt();
    	int qy = sc.nextInt();

    	double tmp = (double)(Math.abs(px - qx)) / 2 + (double)(Math.abs(py - qy)) / 2;

    	pr.println(tmp);

        pr.close();
        sc.close();
    }

	@SuppressWarnings("unused")
	private static class Scanner {
		BufferedReader br;
		Iterator<String> it;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		String next() throws RuntimeException  {
			try {
				if (it == null || !it.hasNext()) {
//					it = Arrays.asList(br.readLine().split(" ")).iterator();
					it = Arrays.asList(br.readLine().split("\\p{javaWhitespace}+")).iterator();
				}
				return it.next();
			} catch (IOException e) {
				throw new IllegalStateException();
			}
		}

		int nextInt() throws RuntimeException {
			return Integer.parseInt(next());
		}

		long nextLong() throws RuntimeException {
			return Long.parseLong(next());
		}

		float nextFloat() throws RuntimeException {
			return Float.parseFloat(next());
		}

		double nextDouble() throws RuntimeException {
			return Double.parseDouble(next());
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new IllegalStateException();
			}
		}
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0