結果

問題 No.172 UFOを捕まえろ
ユーザー matsuyoshi30
提出日時 2016-02-14 23:08:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 382 bytes
コンパイル時間 2,188 ms
コンパイル使用メモリ 75,292 KB
実行使用メモリ 41,656 KB
最終ジャッジ日時 2024-10-15 14:36:33
合計ジャッジ時間 6,386 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int x = in.nextInt();
        int y = in.nextInt();
        int r = in.nextInt();
        double temp = 2 * r / Math.sqrt(2);
        int ans = Math.abs(x) + Math.abs(y) + (int)temp + 1;
        System.out.println(ans);
    }
}
0