結果

問題 No.172 UFOを捕まえろ
ユーザー ffmm00ffmm00
提出日時 2015-06-06 03:06:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 314 bytes
コンパイル時間 3,203 ms
コンパイル使用メモリ 74,328 KB
実行使用メモリ 42,236 KB
最終ジャッジ日時 2024-04-23 14:04:59
合計ジャッジ時間 7,242 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,740 KB
testcase_01 AC 130 ms
41,672 KB
testcase_02 AC 134 ms
41,508 KB
testcase_03 AC 129 ms
41,996 KB
testcase_04 AC 130 ms
41,396 KB
testcase_05 AC 132 ms
41,308 KB
testcase_06 AC 129 ms
41,436 KB
testcase_07 AC 127 ms
41,628 KB
testcase_08 AC 132 ms
41,708 KB
testcase_09 AC 133 ms
40,856 KB
testcase_10 AC 128 ms
41,440 KB
testcase_11 AC 130 ms
41,432 KB
testcase_12 AC 131 ms
42,236 KB
testcase_13 AC 129 ms
41,828 KB
testcase_14 AC 130 ms
41,740 KB
testcase_15 AC 129 ms
41,576 KB
testcase_16 AC 129 ms
41,484 KB
testcase_17 AC 126 ms
41,584 KB
testcase_18 AC 128 ms
41,956 KB
testcase_19 AC 131 ms
41,448 KB
testcase_20 AC 131 ms
41,616 KB
testcase_21 AC 135 ms
41,624 KB
testcase_22 AC 129 ms
41,672 KB
testcase_23 AC 128 ms
41,504 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