結果

問題 No.172 UFOを捕まえろ
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 21:59:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 2,105 ms
コンパイル使用メモリ 71,560 KB
実行使用メモリ 40,024 KB
最終ジャッジ日時 2023-08-17 04:25:07
合計ジャッジ時間 6,405 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
39,380 KB
testcase_01 AC 124 ms
38,980 KB
testcase_02 AC 126 ms
39,976 KB
testcase_03 AC 123 ms
39,332 KB
testcase_04 AC 121 ms
39,228 KB
testcase_05 AC 124 ms
39,536 KB
testcase_06 AC 124 ms
39,072 KB
testcase_07 AC 124 ms
39,572 KB
testcase_08 AC 123 ms
39,120 KB
testcase_09 AC 124 ms
39,576 KB
testcase_10 AC 121 ms
39,156 KB
testcase_11 AC 122 ms
39,156 KB
testcase_12 AC 123 ms
39,948 KB
testcase_13 AC 121 ms
39,492 KB
testcase_14 AC 122 ms
39,144 KB
testcase_15 AC 125 ms
39,452 KB
testcase_16 AC 124 ms
40,024 KB
testcase_17 AC 121 ms
39,360 KB
testcase_18 AC 124 ms
39,536 KB
testcase_19 AC 123 ms
39,216 KB
testcase_20 AC 123 ms
39,104 KB
testcase_21 AC 125 ms
39,668 KB
testcase_22 AC 123 ms
39,376 KB
testcase_23 AC 122 ms
39,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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();
        double a = Math.abs(x) + Math.abs(y) + Math.sqrt(2)*r;
        int b = (int)Math.ceil(a);
        System.out.println(b);
    }
}
0