結果

問題 No.98 円を描こう
ユーザー shinwisteriashinwisteria
提出日時 2019-01-23 19:35:11
言語 Java19
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 350 bytes
コンパイル時間 3,732 ms
コンパイル使用メモリ 72,008 KB
実行使用メモリ 56,580 KB
最終ジャッジ日時 2023-10-14 09:28:49
合計ジャッジ時間 6,035 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
56,036 KB
testcase_01 AC 137 ms
55,864 KB
testcase_02 AC 138 ms
56,400 KB
testcase_03 AC 134 ms
55,544 KB
testcase_04 AC 134 ms
56,024 KB
testcase_05 AC 136 ms
56,168 KB
testcase_06 AC 135 ms
56,328 KB
testcase_07 AC 134 ms
55,908 KB
testcase_08 AC 132 ms
55,556 KB
testcase_09 AC 134 ms
56,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No98 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		double xp = s.nextDouble() , yp = s.nextDouble();
		s.close();

		xp = 2 * Math.sqrt(xp*xp + yp*yp);
		int r;
		if(xp == (int)xp){
			r = (int)xp + 1;
		}else{
			r = (int)Math.ceil(xp);
		}
		System.out.println(r);
	}

}
0