結果

問題 No.172 UFOを捕まえろ
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-03-06 14:09:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 350 bytes
コンパイル時間 2,336 ms
コンパイル使用メモリ 73,896 KB
実行使用メモリ 57,616 KB
最終ジャッジ日時 2023-10-18 23:14:58
合計ジャッジ時間 6,618 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,352 KB
testcase_01 AC 138 ms
57,420 KB
testcase_02 AC 136 ms
57,056 KB
testcase_03 AC 136 ms
57,420 KB
testcase_04 AC 138 ms
57,316 KB
testcase_05 AC 132 ms
57,464 KB
testcase_06 AC 138 ms
57,496 KB
testcase_07 AC 137 ms
57,352 KB
testcase_08 AC 135 ms
57,412 KB
testcase_09 AC 134 ms
57,376 KB
testcase_10 AC 138 ms
57,392 KB
testcase_11 AC 136 ms
57,568 KB
testcase_12 AC 138 ms
57,464 KB
testcase_13 AC 134 ms
57,456 KB
testcase_14 AC 137 ms
57,412 KB
testcase_15 AC 136 ms
57,380 KB
testcase_16 AC 136 ms
57,372 KB
testcase_17 AC 139 ms
57,224 KB
testcase_18 AC 139 ms
57,616 KB
testcase_19 AC 135 ms
57,372 KB
testcase_20 AC 137 ms
57,324 KB
testcase_21 AC 141 ms
57,472 KB
testcase_22 AC 136 ms
57,176 KB
testcase_23 AC 134 ms
57,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import static java.lang.System.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int x = sc.nextInt();
		int y = sc.nextInt();
		int r = sc.nextInt();
		double ans = Math.sqrt(2);
		ans *= r;
		ans += Math.abs(x)+Math.abs(y);
		out.println((int)Math.ceil(ans));
	}
}
0