結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
abc
|
| 提出日時 | 2016-11-03 02:05:36 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 5,000 ms |
| コード長 | 362 bytes |
| コンパイル時間 | 1,971 ms |
| コンパイル使用メモリ | 74,700 KB |
| 実行使用メモリ | 54,228 KB |
| 最終ジャッジ日時 | 2024-11-25 01:49:39 |
| 合計ジャッジ時間 | 4,017 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
double radius = Math.sqrt((x * x) + (y * y));
int diameter = (int) Math.floor(2 * radius) + 1;
System.out.println(diameter);
}
}
abc