結果

問題 No.172 UFOを捕まえろ
ユーザー Tsukasa_Type
提出日時 2018-03-06 14:09:18
言語 Java
(openjdk 23)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 350 bytes
コンパイル時間 2,164 ms
コンパイル使用メモリ 74,096 KB
実行使用メモリ 54,004 KB
最終ジャッジ日時 2024-09-18 19:13:25
合計ジャッジ時間 5,738 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import static java.lang.System.*;

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