結果

問題 No.98 円を描こう
ユーザー kano_townkano_town
提出日時 2014-12-09 23:37:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 6,356 ms
コンパイル使用メモリ 71,840 KB
実行使用メモリ 56,144 KB
最終ジャッジ日時 2023-09-02 12:21:25
合計ジャッジ時間 5,642 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
55,792 KB
testcase_01 AC 140 ms
56,144 KB
testcase_02 AC 142 ms
55,864 KB
testcase_03 AC 142 ms
56,052 KB
testcase_04 AC 140 ms
55,588 KB
testcase_05 AC 140 ms
55,864 KB
testcase_06 WA -
testcase_07 AC 139 ms
55,984 KB
testcase_08 AC 140 ms
55,908 KB
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder98 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x = sc.nextDouble(), y = sc.nextDouble();

		if (Math.hypot(x, y) % 1 == 0)
			System.out.println(1 + 2 * (int) Math.ceil(Math.hypot(x, y)));
		else
			System.out.println(2 * (int) Math.ceil(Math.hypot(x, y)));

	}
}
0