結果

問題 No.98 円を描こう
ユーザー nCk_cvnCk_cv
提出日時 2016-01-29 14:12:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 290 bytes
コンパイル時間 2,161 ms
コンパイル使用メモリ 74,228 KB
実行使用メモリ 57,536 KB
最終ジャッジ日時 2023-10-21 16:35:20
合計ジャッジ時間 4,029 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,536 KB
testcase_01 AC 132 ms
57,380 KB
testcase_02 AC 130 ms
57,412 KB
testcase_03 AC 133 ms
57,416 KB
testcase_04 AC 133 ms
57,480 KB
testcase_05 AC 132 ms
57,440 KB
testcase_06 AC 133 ms
57,492 KB
testcase_07 AC 132 ms
57,436 KB
testcase_08 AC 122 ms
56,276 KB
testcase_09 AC 133 ms
57,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int xp = sc.nextInt();
		int yp = sc.nextInt();
		int d = xp * xp + yp * yp;
		System.out.println((int)(Math.sqrt(d)*2)+1);
	}
}
0