結果

問題 No.172 UFOを捕まえろ
ユーザー キョウチクキョウチク
提出日時 2022-05-17 19:29:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 109 ms / 5,000 ms
コード長 396 bytes
コンパイル時間 6,809 ms
コンパイル使用メモリ 71,500 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2023-10-13 18:54:05
合計ジャッジ時間 9,971 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
55,916 KB
testcase_01 AC 97 ms
55,932 KB
testcase_02 AC 100 ms
56,044 KB
testcase_03 AC 108 ms
56,356 KB
testcase_04 AC 109 ms
56,136 KB
testcase_05 AC 103 ms
55,976 KB
testcase_06 AC 99 ms
55,960 KB
testcase_07 AC 101 ms
55,980 KB
testcase_08 AC 100 ms
56,176 KB
testcase_09 AC 101 ms
55,892 KB
testcase_10 AC 98 ms
55,652 KB
testcase_11 AC 100 ms
55,640 KB
testcase_12 AC 99 ms
55,820 KB
testcase_13 AC 100 ms
55,608 KB
testcase_14 AC 99 ms
55,788 KB
testcase_15 AC 100 ms
55,888 KB
testcase_16 AC 100 ms
55,656 KB
testcase_17 AC 104 ms
56,164 KB
testcase_18 AC 102 ms
55,712 KB
testcase_19 AC 104 ms
55,876 KB
testcase_20 AC 107 ms
56,056 KB
testcase_21 AC 102 ms
55,864 KB
testcase_22 AC 100 ms
55,976 KB
testcase_23 AC 98 ms
55,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Test11 {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String[] line;
    line=sc.nextLine().split(" ");
    int x=Integer.parseInt(line[0]);
    int y=Integer.parseInt(line[1]);
    int r=Integer.parseInt(line[2]);
    int d=Math.abs(x)+Math.abs(y)+(int)(r*Math.sqrt(2))+1;
    System.out.println(d);
    sc.close();
  }
}
0