結果

問題 No.172 UFOを捕まえろ
ユーザー shinwisteria
提出日時 2019-03-17 16:01:10
言語 Java
(openjdk 23)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 2,858 ms
コンパイル使用メモリ 74,716 KB
実行使用メモリ 56,240 KB
最終ジャッジ日時 2024-07-06 22:24:03
合計ジャッジ時間 6,459 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No172 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int x = Math.abs(s.nextInt()) , y = Math.abs(s.nextInt()) , r = s.nextInt();
		s.close();

		System.out.println((int)Math.ceil(x + y + Math.sqrt(2)*r));

	}

}
0