結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
takeya_okino
|
| 提出日時 | 2017-07-08 22:49:08 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 129 ms / 5,000 ms |
| コード長 | 411 bytes |
| コンパイル時間 | 2,138 ms |
| コンパイル使用メモリ | 74,516 KB |
| 実行使用メモリ | 53,976 KB |
| 最終ジャッジ日時 | 2024-10-06 20:14:21 |
| 合計ジャッジ時間 | 3,713 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int xp = sc.nextInt();
int yp = sc.nextInt();
int s = xp * xp + yp * yp;
int r = (int)Math.sqrt(s);
int ans = 0;
for(int i = 2 * r; i <= 2 * r + 4; i++) {
if(i * i > 4 * s) {
ans = i;
break;
}
}
System.out.println(ans);
}
}
takeya_okino