結果

問題 No.98 円を描こう
ユーザー papipenpapipen
提出日時 2017-04-11 22:46:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 321 bytes
コンパイル時間 2,132 ms
コンパイル使用メモリ 71,300 KB
実行使用メモリ 55,900 KB
最終ジャッジ日時 2023-09-25 11:19:28
合計ジャッジ時間 4,552 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,740 KB
testcase_01 AC 129 ms
55,680 KB
testcase_02 AC 131 ms
55,888 KB
testcase_03 AC 126 ms
55,736 KB
testcase_04 AC 127 ms
55,404 KB
testcase_05 AC 125 ms
55,796 KB
testcase_06 AC 128 ms
54,036 KB
testcase_07 AC 129 ms
55,900 KB
testcase_08 AC 131 ms
55,760 KB
testcase_09 AC 129 ms
55,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class N098{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int x = s.nextInt();
		int y = s.nextInt();
		double a = Math.pow(x, 2) + Math.pow(y, 2);
		for(int i = 0; true; i++){
			if(Math.pow(i / 2d, 2) > a){
				System.out.println(i);
				break;
			}
		}
	}
}
0