結果

問題 No.172 UFOを捕まえろ
ユーザー k_kadorak_kadora
提出日時 2015-05-27 14:48:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 319 bytes
コンパイル時間 3,450 ms
コンパイル使用メモリ 74,316 KB
実行使用メモリ 41,880 KB
最終ジャッジ日時 2024-04-23 14:04:12
合計ジャッジ時間 7,470 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,668 KB
testcase_01 AC 131 ms
41,588 KB
testcase_02 AC 131 ms
41,748 KB
testcase_03 AC 132 ms
41,696 KB
testcase_04 AC 134 ms
41,452 KB
testcase_05 AC 130 ms
41,280 KB
testcase_06 AC 131 ms
41,288 KB
testcase_07 AC 131 ms
41,880 KB
testcase_08 AC 135 ms
41,552 KB
testcase_09 AC 131 ms
41,408 KB
testcase_10 AC 130 ms
41,532 KB
testcase_11 AC 130 ms
41,444 KB
testcase_12 AC 132 ms
41,488 KB
testcase_13 AC 116 ms
41,540 KB
testcase_14 AC 133 ms
41,596 KB
testcase_15 AC 133 ms
41,436 KB
testcase_16 AC 130 ms
41,376 KB
testcase_17 AC 130 ms
41,580 KB
testcase_18 AC 130 ms
41,528 KB
testcase_19 AC 116 ms
41,532 KB
testcase_20 AC 129 ms
41,424 KB
testcase_21 AC 133 ms
41,800 KB
testcase_22 AC 119 ms
41,596 KB
testcase_23 AC 131 ms
41,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Ufo {
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		int x,y,r,res;
		double temp;
		x = sc.nextInt();
		y = sc.nextInt();
		r = sc.nextInt();
		temp = 2 * r / Math.sqrt(2);
		res = Math.abs(x)+Math.abs(y)+(int)temp + 1;
		System.out.println(res);
	}
}
0