結果

問題 No.98 円を描こう
ユーザー fukuseifukusei
提出日時 2017-05-17 17:35:41
言語 Java19
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 255 bytes
コンパイル時間 3,244 ms
コンパイル使用メモリ 74,876 KB
実行使用メモリ 57,708 KB
最終ジャッジ日時 2023-10-17 23:57:25
合計ジャッジ時間 5,196 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,532 KB
testcase_01 AC 130 ms
57,696 KB
testcase_02 AC 130 ms
57,508 KB
testcase_03 AC 129 ms
57,560 KB
testcase_04 AC 130 ms
57,540 KB
testcase_05 AC 115 ms
56,224 KB
testcase_06 AC 126 ms
57,396 KB
testcase_07 AC 132 ms
57,536 KB
testcase_08 AC 129 ms
57,708 KB
testcase_09 AC 128 ms
57,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*; 

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