結果

問題 No.172 UFOを捕まえろ
ユーザー nCk_cvnCk_cv
提出日時 2016-01-21 02:53:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 323 bytes
コンパイル時間 2,350 ms
コンパイル使用メモリ 75,000 KB
実行使用メモリ 42,136 KB
最終ジャッジ日時 2024-04-23 14:24:22
合計ジャッジ時間 6,329 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
41,592 KB
testcase_01 AC 134 ms
41,820 KB
testcase_02 AC 137 ms
41,072 KB
testcase_03 AC 141 ms
41,720 KB
testcase_04 AC 135 ms
41,620 KB
testcase_05 AC 133 ms
41,524 KB
testcase_06 AC 132 ms
41,424 KB
testcase_07 AC 132 ms
41,388 KB
testcase_08 AC 137 ms
41,308 KB
testcase_09 AC 137 ms
41,864 KB
testcase_10 AC 141 ms
41,432 KB
testcase_11 AC 135 ms
41,484 KB
testcase_12 AC 139 ms
41,644 KB
testcase_13 AC 137 ms
41,920 KB
testcase_14 AC 141 ms
41,440 KB
testcase_15 AC 143 ms
41,520 KB
testcase_16 AC 137 ms
41,244 KB
testcase_17 AC 138 ms
41,368 KB
testcase_18 AC 139 ms
41,664 KB
testcase_19 AC 138 ms
41,284 KB
testcase_20 AC 140 ms
41,480 KB
testcase_21 AC 143 ms
41,808 KB
testcase_22 AC 134 ms
42,136 KB
testcase_23 AC 136 ms
41,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		int r = sc.nextInt();
		System.out.printf("%.0f\n",Math.ceil(Math.abs(x) + Math.abs(y) + Math.sqrt(2) * r));
	}
}
0