結果

問題 No.98 円を描こう
ユーザー dogwood0424
提出日時 2017-12-04 15:17:13
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 3,622 ms
コンパイル使用メモリ 74,328 KB
実行使用メモリ 54,244 KB
最終ジャッジ日時 2024-11-28 15:10:29
合計ジャッジ時間 5,388 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

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