結果

問題 No.98 円を描こう
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-15 10:46:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 5,000 ms
コード長 290 bytes
コンパイル時間 3,398 ms
コンパイル使用メモリ 71,736 KB
実行使用メモリ 56,452 KB
最終ジャッジ日時 2023-08-26 20:40:20
合計ジャッジ時間 5,468 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
56,068 KB
testcase_01 AC 138 ms
56,152 KB
testcase_02 AC 137 ms
56,220 KB
testcase_03 AC 135 ms
56,152 KB
testcase_04 AC 135 ms
55,756 KB
testcase_05 AC 137 ms
56,452 KB
testcase_06 AC 136 ms
56,140 KB
testcase_07 AC 135 ms
56,140 KB
testcase_08 AC 146 ms
56,020 KB
testcase_09 AC 138 ms
55,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No98 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x = sc.nextDouble();
		double y = sc.nextDouble();
		int R = (int)(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)) * 2) + 1;
		
		System.out.println(R);
	}
}
0