結果

問題 No.172 UFOを捕まえろ
ユーザー ぴろずぴろず
提出日時 2015-03-26 23:24:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 1,906 ms
コンパイル使用メモリ 72,556 KB
実行使用メモリ 56,528 KB
最終ジャッジ日時 2023-08-05 16:46:53
合計ジャッジ時間 5,759 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,480 KB
testcase_01 AC 117 ms
55,604 KB
testcase_02 AC 118 ms
56,004 KB
testcase_03 AC 117 ms
55,932 KB
testcase_04 AC 113 ms
55,444 KB
testcase_05 AC 112 ms
55,240 KB
testcase_06 AC 115 ms
55,804 KB
testcase_07 AC 116 ms
55,856 KB
testcase_08 AC 117 ms
55,232 KB
testcase_09 AC 116 ms
55,492 KB
testcase_10 AC 116 ms
55,936 KB
testcase_11 AC 113 ms
55,856 KB
testcase_12 AC 113 ms
55,396 KB
testcase_13 AC 115 ms
55,876 KB
testcase_14 AC 123 ms
55,524 KB
testcase_15 AC 114 ms
55,480 KB
testcase_16 AC 120 ms
56,040 KB
testcase_17 AC 117 ms
55,408 KB
testcase_18 AC 114 ms
56,008 KB
testcase_19 AC 116 ms
55,912 KB
testcase_20 AC 116 ms
56,528 KB
testcase_21 AC 117 ms
55,956 KB
testcase_22 AC 122 ms
55,756 KB
testcase_23 AC 119 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no172;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = Math.abs(sc.nextInt());
		int y = Math.abs(sc.nextInt());
		int r = sc.nextInt();
		int x2 = x + y;
		int y2 = x - y;
		System.out.println((int) Math.ceil(1E-9 + Math.max(x2,y2) + Math.sqrt(2) * r));
	}

}
0