結果

問題 No.172 UFOを捕まえろ
ユーザー keitamidokeitamido
提出日時 2017-06-08 11:30:40
言語 Java19
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 341 bytes
コンパイル時間 2,724 ms
コンパイル使用メモリ 74,776 KB
実行使用メモリ 57,664 KB
最終ジャッジ日時 2023-10-23 19:44:20
合計ジャッジ時間 7,248 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
56,176 KB
testcase_01 AC 122 ms
57,508 KB
testcase_02 AC 125 ms
57,356 KB
testcase_03 AC 127 ms
57,520 KB
testcase_04 AC 124 ms
57,352 KB
testcase_05 AC 123 ms
57,372 KB
testcase_06 AC 121 ms
55,280 KB
testcase_07 AC 133 ms
57,588 KB
testcase_08 AC 122 ms
57,552 KB
testcase_09 AC 123 ms
57,664 KB
testcase_10 AC 127 ms
57,640 KB
testcase_11 AC 125 ms
57,352 KB
testcase_12 AC 123 ms
57,404 KB
testcase_13 AC 125 ms
57,292 KB
testcase_14 AC 125 ms
57,376 KB
testcase_15 AC 127 ms
57,476 KB
testcase_16 AC 122 ms
57,520 KB
testcase_17 AC 124 ms
57,640 KB
testcase_18 AC 124 ms
57,532 KB
testcase_19 AC 124 ms
57,520 KB
testcase_20 AC 125 ms
57,316 KB
testcase_21 AC 131 ms
57,520 KB
testcase_22 AC 125 ms
57,380 KB
testcase_23 AC 122 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class Ufo {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());
		double shahen = Double.parseDouble(scan.next()) * Math.sqrt(2);
		System.out.println(Math.abs(x) + Math.abs(y) + (int)Math.ceil(shahen));
	}
}
0