結果

問題 No.98 円を描こう
ユーザー mits58mits58
提出日時 2016-07-02 20:15:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 2,063 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 54,336 KB
最終ジャッジ日時 2024-04-20 06:10:42
合計ジャッジ時間 4,024 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
54,328 KB
testcase_01 AC 115 ms
53,784 KB
testcase_02 AC 115 ms
53,668 KB
testcase_03 AC 112 ms
53,404 KB
testcase_04 AC 123 ms
54,336 KB
testcase_05 AC 122 ms
54,228 KB
testcase_06 AC 111 ms
53,348 KB
testcase_07 AC 122 ms
53,456 KB
testcase_08 AC 125 ms
54,236 KB
testcase_09 AC 125 ms
53,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			double x=sc.nextDouble();
			double y=sc.nextDouble();
			int r=(int)Math.sqrt(4*x*x+4*y*y);
			System.out.println(r+1);
		}
	}
}
0