結果

問題 No.172 UFOを捕まえろ
ユーザー ffmm00ffmm00
提出日時 2015-06-06 03:06:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 314 bytes
コンパイル時間 3,093 ms
コンパイル使用メモリ 72,116 KB
実行使用メモリ 56,288 KB
最終ジャッジ日時 2023-08-05 17:07:04
合計ジャッジ時間 7,128 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,992 KB
testcase_01 AC 122 ms
56,148 KB
testcase_02 AC 119 ms
55,800 KB
testcase_03 AC 121 ms
55,780 KB
testcase_04 AC 121 ms
55,764 KB
testcase_05 AC 120 ms
55,928 KB
testcase_06 AC 120 ms
55,680 KB
testcase_07 AC 121 ms
55,436 KB
testcase_08 AC 122 ms
56,020 KB
testcase_09 AC 121 ms
55,948 KB
testcase_10 AC 121 ms
55,876 KB
testcase_11 AC 120 ms
56,288 KB
testcase_12 AC 119 ms
55,964 KB
testcase_13 AC 120 ms
55,604 KB
testcase_14 AC 123 ms
55,924 KB
testcase_15 AC 123 ms
55,488 KB
testcase_16 AC 120 ms
55,608 KB
testcase_17 AC 121 ms
55,560 KB
testcase_18 AC 120 ms
56,072 KB
testcase_19 AC 123 ms
53,740 KB
testcase_20 AC 121 ms
55,792 KB
testcase_21 AC 124 ms
55,792 KB
testcase_22 AC 119 ms
56,228 KB
testcase_23 AC 120 ms
55,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N172 {

	public static void main(String[] args) {
		Scanner sca = new Scanner(System.in);

		int x = sca.nextInt();
		int y = sca.nextInt();
		int r = sca.nextInt();

		double D = Math.abs(x) + Math.abs(y) + Math.ceil(r * Math.sqrt(2));

		System.out.println((int)D);

	}

}
0