結果

問題 No.172 UFOを捕まえろ
ユーザー samplelpmas
提出日時 2017-01-23 16:07:20
言語 Java
(openjdk 23)
結果
AC  
実行時間 152 ms / 5,000 ms
コード長 376 bytes
コンパイル時間 4,699 ms
コンパイル使用メモリ 74,548 KB
実行使用メモリ 41,436 KB
最終ジャッジ日時 2024-12-23 07:29:44
合計ジャッジ時間 8,326 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int x = Math.abs(sc.nextInt());
        int y = Math.abs(sc.nextInt());
        int radius = sc.nextInt();

        int barrier = (int) Math.ceil(x + y + (Math.sqrt(2) * radius));

        System.out.println(barrier);

    }

}
0