結果

問題 No.172 UFOを捕まえろ
ユーザー spaciaspacia
提出日時 2016-01-03 14:28:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 514 bytes
コンパイル時間 2,379 ms
コンパイル使用メモリ 74,660 KB
実行使用メモリ 37,208 KB
最終ジャッジ日時 2024-04-23 14:23:51
合計ジャッジ時間 4,307 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
36,748 KB
testcase_01 AC 52 ms
36,904 KB
testcase_02 AC 53 ms
36,940 KB
testcase_03 AC 54 ms
36,784 KB
testcase_04 AC 52 ms
36,952 KB
testcase_05 AC 53 ms
36,728 KB
testcase_06 AC 57 ms
36,636 KB
testcase_07 AC 53 ms
36,908 KB
testcase_08 AC 55 ms
36,936 KB
testcase_09 AC 55 ms
36,940 KB
testcase_10 AC 57 ms
37,208 KB
testcase_11 AC 50 ms
37,048 KB
testcase_12 AC 53 ms
37,064 KB
testcase_13 AC 56 ms
36,608 KB
testcase_14 AC 52 ms
36,832 KB
testcase_15 AC 53 ms
36,932 KB
testcase_16 AC 52 ms
36,612 KB
testcase_17 AC 54 ms
37,036 KB
testcase_18 AC 53 ms
37,000 KB
testcase_19 AC 54 ms
36,816 KB
testcase_20 AC 55 ms
36,940 KB
testcase_21 AC 54 ms
36,936 KB
testcase_22 AC 53 ms
36,620 KB
testcase_23 AC 55 ms
36,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class Main {
	
	public static void out (Object o) {
		System.out.println(o);
	}
		
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String[] line = br.readLine().split(" ");
		int x = Math.abs(Integer.parseInt(line[0]));
		int y = Math.abs(Integer.parseInt(line[1]));
		int r = Integer.parseInt(line[2]);
		double d = x + y + Math.sqrt(2) * r;
		
		out((int)Math.ceil(d));
	}
}
0