結果

問題 No.172 UFOを捕まえろ
ユーザー jimanojimano
提出日時 2018-02-10 20:32:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 48 ms / 5,000 ms
コード長 519 bytes
コンパイル時間 4,644 ms
コンパイル使用メモリ 71,332 KB
実行使用メモリ 49,760 KB
最終ジャッジ日時 2023-08-05 20:28:54
合計ジャッジ時間 5,763 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,420 KB
testcase_01 AC 44 ms
49,440 KB
testcase_02 AC 45 ms
49,256 KB
testcase_03 AC 45 ms
49,760 KB
testcase_04 AC 45 ms
49,328 KB
testcase_05 AC 45 ms
49,720 KB
testcase_06 AC 45 ms
49,524 KB
testcase_07 AC 45 ms
49,476 KB
testcase_08 AC 45 ms
49,452 KB
testcase_09 AC 44 ms
49,280 KB
testcase_10 AC 45 ms
49,392 KB
testcase_11 AC 45 ms
49,356 KB
testcase_12 AC 45 ms
49,536 KB
testcase_13 AC 46 ms
49,400 KB
testcase_14 AC 44 ms
49,548 KB
testcase_15 AC 44 ms
49,452 KB
testcase_16 AC 46 ms
49,544 KB
testcase_17 AC 46 ms
49,408 KB
testcase_18 AC 48 ms
49,264 KB
testcase_19 AC 48 ms
49,588 KB
testcase_20 AC 45 ms
49,440 KB
testcase_21 AC 44 ms
49,248 KB
testcase_22 AC 44 ms
49,268 KB
testcase_23 AC 45 ms
49,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0172 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] str = br.readLine().split(" ");
		int x = Integer.parseInt(str[0]);
		int y = Integer.parseInt(str[1]);
		int r = Integer.parseInt(str[2]);
		// 
		System.out.println((int)(Math.abs(x) + Math.abs(y) + r * Math.sqrt(2.0)) + 1);
	}
}
0