結果

問題 No.172 UFOを捕まえろ
ユーザー dazydazy
提出日時 2016-09-23 19:12:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 394 bytes
コンパイル時間 3,620 ms
コンパイル使用メモリ 73,772 KB
実行使用メモリ 41,392 KB
最終ジャッジ日時 2024-04-28 22:40:15
合計ジャッジ時間 7,474 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,320 KB
testcase_01 AC 131 ms
41,364 KB
testcase_02 AC 133 ms
40,924 KB
testcase_03 AC 132 ms
41,320 KB
testcase_04 AC 131 ms
40,776 KB
testcase_05 AC 131 ms
41,336 KB
testcase_06 AC 132 ms
40,980 KB
testcase_07 AC 137 ms
40,948 KB
testcase_08 AC 133 ms
41,324 KB
testcase_09 AC 124 ms
39,904 KB
testcase_10 AC 120 ms
39,696 KB
testcase_11 AC 132 ms
41,340 KB
testcase_12 AC 131 ms
40,904 KB
testcase_13 AC 132 ms
41,004 KB
testcase_14 AC 131 ms
40,984 KB
testcase_15 AC 131 ms
41,136 KB
testcase_16 AC 132 ms
41,216 KB
testcase_17 AC 133 ms
41,192 KB
testcase_18 AC 133 ms
41,068 KB
testcase_19 AC 134 ms
41,192 KB
testcase_20 AC 135 ms
41,116 KB
testcase_21 AC 132 ms
41,340 KB
testcase_22 AC 133 ms
41,196 KB
testcase_23 AC 131 ms
41,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Run {
    final static double s = Math.sin(Math.PI/4) * 2;
    public static void main (String arg[]) {
        Scanner scan = new Scanner(System.in);
        int x = Math.abs(scan.nextInt());
        int y = Math.abs(scan.nextInt());
        int r = scan.nextInt();
        double m = Math.ceil(x + y + r * s);

        System.out.println(((int) m));
    }
}
0