結果

問題 No.172 UFOを捕まえろ
ユーザー uafr_csuafr_cs
提出日時 2015-05-15 18:35:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 145 ms / 5,000 ms
コード長 500 bytes
コンパイル時間 2,330 ms
コンパイル使用メモリ 74,440 KB
実行使用メモリ 54,204 KB
最終ジャッジ日時 2024-04-23 14:03:48
合計ジャッジ時間 6,136 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
54,204 KB
testcase_01 AC 144 ms
41,528 KB
testcase_02 AC 132 ms
41,332 KB
testcase_03 AC 140 ms
41,532 KB
testcase_04 AC 134 ms
42,236 KB
testcase_05 AC 134 ms
41,480 KB
testcase_06 AC 136 ms
41,268 KB
testcase_07 AC 142 ms
41,840 KB
testcase_08 AC 132 ms
41,980 KB
testcase_09 AC 131 ms
41,200 KB
testcase_10 AC 131 ms
41,636 KB
testcase_11 AC 129 ms
41,272 KB
testcase_12 AC 129 ms
41,496 KB
testcase_13 AC 136 ms
41,676 KB
testcase_14 AC 130 ms
41,276 KB
testcase_15 AC 132 ms
41,388 KB
testcase_16 AC 135 ms
41,672 KB
testcase_17 AC 134 ms
41,348 KB
testcase_18 AC 131 ms
41,528 KB
testcase_19 AC 133 ms
41,584 KB
testcase_20 AC 132 ms
41,628 KB
testcase_21 AC 132 ms
40,228 KB
testcase_22 AC 132 ms
41,764 KB
testcase_23 AC 145 ms
41,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		
		final int x = sc.nextInt();
		final int y = sc.nextInt();
		final int r = sc.nextInt();
		
		System.out.println((int) (Math.abs(x) + Math.abs(y) + Math.ceil(r * Math.sqrt(2))));
	}
}
0