結果
問題 | No.172 UFOを捕まえろ |
ユーザー | spacia |
提出日時 | 2016-01-03 14:28:10 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 53 ms / 5,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 2,013 ms |
コンパイル使用メモリ | 74,900 KB |
実行使用メモリ | 37,084 KB |
最終ジャッジ日時 | 2024-10-15 14:34:50 |
合計ジャッジ時間 | 4,078 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import java.io.*; import java.util.*; class Main { public static void out (Object o) { System.out.println(o); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] line = br.readLine().split(" "); int x = Math.abs(Integer.parseInt(line[0])); int y = Math.abs(Integer.parseInt(line[1])); int r = Integer.parseInt(line[2]); double d = x + y + Math.sqrt(2) * r; out((int)Math.ceil(d)); } }