結果
問題 |
No.172 UFOを捕まえろ
|
ユーザー |
![]() |
提出日時 | 2017-04-30 09:41:08 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 57 ms / 5,000 ms |
コード長 | 612 bytes |
コンパイル時間 | 2,483 ms |
コンパイル使用メモリ | 74,816 KB |
実行使用メモリ | 50,452 KB |
最終ジャッジ日時 | 2024-09-13 23:29:02 |
合計ジャッジ時間 | 4,852 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); int x = Integer.parseInt(inputs[0]); int y = Integer.parseInt(inputs[1]); int r = Integer.parseInt(inputs[2]); x = Math.abs(x); y = Math.abs(y); System.out.println((int)Math.ceil(x + y + r * Math.sqrt(2))); } }