結果

問題 No.172 UFOを捕まえろ
ユーザー shinwisteriashinwisteria
提出日時 2019-03-17 16:01:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 3,286 ms
コンパイル使用メモリ 72,784 KB
実行使用メモリ 56,348 KB
最終ジャッジ日時 2023-09-21 03:45:07
合計ジャッジ時間 7,802 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,868 KB
testcase_01 AC 126 ms
55,508 KB
testcase_02 AC 127 ms
55,776 KB
testcase_03 AC 126 ms
55,392 KB
testcase_04 AC 125 ms
55,652 KB
testcase_05 AC 126 ms
53,440 KB
testcase_06 AC 128 ms
55,412 KB
testcase_07 AC 126 ms
55,392 KB
testcase_08 AC 129 ms
55,676 KB
testcase_09 AC 127 ms
55,460 KB
testcase_10 AC 129 ms
55,648 KB
testcase_11 AC 129 ms
55,688 KB
testcase_12 AC 126 ms
55,408 KB
testcase_13 AC 123 ms
55,596 KB
testcase_14 AC 129 ms
56,348 KB
testcase_15 AC 128 ms
39,612 KB
testcase_16 AC 126 ms
39,348 KB
testcase_17 AC 126 ms
39,400 KB
testcase_18 AC 127 ms
39,772 KB
testcase_19 AC 128 ms
39,320 KB
testcase_20 AC 127 ms
39,136 KB
testcase_21 AC 129 ms
39,608 KB
testcase_22 AC 131 ms
39,600 KB
testcase_23 AC 128 ms
39,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No172 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int x = Math.abs(s.nextInt()) , y = Math.abs(s.nextInt()) , r = s.nextInt();
		s.close();

		System.out.println((int)Math.ceil(x + y + Math.sqrt(2)*r));

	}

}
0