結果
問題 | No.172 UFOを捕まえろ |
ユーザー |
![]() |
提出日時 | 2015-03-26 23:24:50 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 5,000 ms |
コード長 | 361 bytes |
コンパイル時間 | 2,129 ms |
コンパイル使用メモリ | 74,072 KB |
実行使用メモリ | 41,352 KB |
最終ジャッジ日時 | 2024-10-15 13:52:13 |
合計ジャッジ時間 | 5,464 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
package no172; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = Math.abs(sc.nextInt()); int y = Math.abs(sc.nextInt()); int r = sc.nextInt(); int x2 = x + y; int y2 = x - y; System.out.println((int) Math.ceil(1E-9 + Math.max(x2,y2) + Math.sqrt(2) * r)); } }