結果
問題 |
No.172 UFOを捕まえろ
|
ユーザー |
|
提出日時 | 2017-06-24 22:14:39 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 605 bytes |
コンパイル時間 | 2,498 ms |
コンパイル使用メモリ | 84,652 KB |
実行使用メモリ | 53,112 KB |
最終ジャッジ日時 | 2024-10-04 03:05:33 |
合計ジャッジ時間 | 5,051 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 21 |
ソースコード
import java.util.*; import java.util.Scanner; import java.io.FileNotFoundException; import java.io.File; class CatchTheUFO{ public static void main(String args[]){ try{ File file = new File("test.txt"); Scanner scan = new Scanner(file); int x = Integer.parseInt(scan.next()); int y = Integer.parseInt(scan.next()); int r = Integer.parseInt(scan.next()); double ans_d = Math.sqrt(2) * r; ans_d = Math.ceil(ans_d); int ans = (int) ans_d; System.out.println(ans); }catch(FileNotFoundException e){ System.out.println(e); } } }