結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
takeya_okino
|
| 提出日時 | 2017-06-23 15:44:36 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 2,090 ms |
| コンパイル使用メモリ | 74,388 KB |
| 実行使用メモリ | 54,500 KB |
| 最終ジャッジ日時 | 2024-10-03 04:10:40 |
| 合計ジャッジ時間 | 5,427 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 11 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int r = sc.nextInt();
int a = 0;
for(int i = 1; i <= 200; i++) {
if(i * i > 2 * r * r) {
a = i;
break;
}
}
int ans = Math.max(Math.abs(x + y + a), Math.abs(x + y - a));
System.out.println(ans);
}
}
takeya_okino