結果

問題 No.172 UFOを捕まえろ
ユーザー kohaku_kohaku
提出日時 2016-11-13 21:59:17
言語 Java
(openjdk 23)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 1,753 ms
コンパイル使用メモリ 74,564 KB
実行使用メモリ 41,328 KB
最終ジャッジ日時 2024-11-25 22:01:13
合計ジャッジ時間 5,285 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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