結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2018-05-16 20:16:19 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| コード長 | 337 bytes |
| 記録 | |
| コンパイル時間 | 1,515 ms |
| コンパイル使用メモリ | 82,496 KB |
| 実行使用メモリ | 46,532 KB |
| 最終ジャッジ日時 | 2026-03-17 07:38:50 |
| 合計ジャッジ時間 | 2,779 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int y = scan.nextInt();
scan.close();
double r = 2 * Math.sqrt(x * x + y * y);
if(r == 0) {
System.out.println(1);
}else {
System.out.println((int)r + 1);
}
}
}
YamaKasa