結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
kenji_shioya
|
| 提出日時 | 2016-06-27 17:30:33 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 2,515 ms |
| コンパイル使用メモリ | 81,728 KB |
| 実行使用メモリ | 41,676 KB |
| 最終ジャッジ日時 | 2026-04-28 08:06:27 |
| 合計ジャッジ時間 | 4,649 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.*;
public class Exercise133{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
double r = Math.sqrt(x * x + y * y);
if(r % 1 == 0){
System.out.println((int)(r * 2 + 1));
}else{
System.out.println((int)(Math.ceil(r * 2)));
}
}
}
kenji_shioya