結果

問題 No.172 UFOを捕まえろ
ユーザー threepipes_sthreepipes_s
提出日時 2015-02-13 16:44:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 303 bytes
コンパイル時間 2,256 ms
コンパイル使用メモリ 74,560 KB
実行使用メモリ 41,844 KB
最終ジャッジ日時 2024-04-23 13:49:48
合計ジャッジ時間 6,620 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
40,404 KB
testcase_01 AC 130 ms
41,416 KB
testcase_02 AC 136 ms
41,668 KB
testcase_03 AC 133 ms
41,812 KB
testcase_04 AC 133 ms
41,284 KB
testcase_05 AC 118 ms
41,156 KB
testcase_06 AC 131 ms
40,984 KB
testcase_07 AC 132 ms
41,284 KB
testcase_08 AC 130 ms
41,192 KB
testcase_09 AC 131 ms
41,452 KB
testcase_10 AC 130 ms
39,876 KB
testcase_11 AC 132 ms
41,104 KB
testcase_12 AC 131 ms
41,172 KB
testcase_13 AC 132 ms
41,112 KB
testcase_14 AC 131 ms
41,084 KB
testcase_15 AC 130 ms
41,584 KB
testcase_16 AC 121 ms
40,060 KB
testcase_17 AC 131 ms
41,288 KB
testcase_18 AC 117 ms
41,812 KB
testcase_19 AC 132 ms
41,624 KB
testcase_20 AC 128 ms
41,192 KB
testcase_21 AC 132 ms
41,844 KB
testcase_22 AC 135 ms
41,380 KB
testcase_23 AC 129 ms
41,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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