結果

問題 No.98 円を描こう
ユーザー dogwood0424dogwood0424
提出日時 2017-12-04 15:17:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 106 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 5,594 ms
コンパイル使用メモリ 72,192 KB
実行使用メモリ 56,872 KB
最終ジャッジ日時 2023-08-19 02:24:59
合計ジャッジ時間 4,834 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
56,032 KB
testcase_01 AC 104 ms
56,072 KB
testcase_02 AC 104 ms
56,136 KB
testcase_03 AC 104 ms
56,872 KB
testcase_04 AC 105 ms
56,260 KB
testcase_05 AC 103 ms
56,060 KB
testcase_06 AC 104 ms
55,736 KB
testcase_07 AC 105 ms
56,260 KB
testcase_08 AC 104 ms
55,968 KB
testcase_09 AC 106 ms
56,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No98 {
	public static void main(String[]args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();

		double d = Math.sqrt(x*x+y*y);


		int D = (int)Math.floor(2*d);

		System.out.println(D+1);

	}


}
0