結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
kenji_shioya
|
| 提出日時 | 2016-06-27 17:30:33 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 135 ms / 5,000 ms |
| コード長 | 363 bytes |
| コンパイル時間 | 4,447 ms |
| コンパイル使用メモリ | 74,132 KB |
| 実行使用メモリ | 41,236 KB |
| 最終ジャッジ日時 | 2024-10-11 22:24:12 |
| 合計ジャッジ時間 | 5,570 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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