結果

問題 No.98 円を描こう
ユーザー kou6839kou6839
提出日時 2014-12-12 16:04:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 383 bytes
コンパイル時間 2,138 ms
コンパイル使用メモリ 71,260 KB
実行使用メモリ 56,052 KB
最終ジャッジ日時 2023-09-02 14:22:49
合計ジャッジ時間 4,034 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,592 KB
testcase_01 AC 128 ms
55,620 KB
testcase_02 AC 128 ms
56,052 KB
testcase_03 AC 129 ms
55,384 KB
testcase_04 AC 127 ms
55,624 KB
testcase_05 AC 129 ms
55,592 KB
testcase_06 AC 129 ms
55,788 KB
testcase_07 AC 129 ms
56,000 KB
testcase_08 AC 129 ms
55,588 KB
testcase_09 AC 129 ms
55,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();
        for(int i=1;;i++){
        	if(i*1.0/2>Math.sqrt(x*x*1.0+y*y*1.0)){
        		System.out.println(i);
        		return;
        	}
        }
    }
}	
0