結果

問題 No.98 円を描こう
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-10 13:48:34
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 378 bytes
コンパイル時間 2,418 ms
コンパイル使用メモリ 71,920 KB
実行使用メモリ 56,368 KB
最終ジャッジ日時 2023-09-17 19:09:51
合計ジャッジ時間 4,002 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
56,028 KB
testcase_01 AC 125 ms
55,760 KB
testcase_02 AC 122 ms
56,232 KB
testcase_03 AC 125 ms
56,356 KB
testcase_04 AC 124 ms
55,924 KB
testcase_05 AC 124 ms
54,064 KB
testcase_06 WA -
testcase_07 AC 122 ms
56,128 KB
testcase_08 AC 123 ms
53,952 KB
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
        int x = koko.nextInt();
        int y = koko.nextInt();
        double d =  Math.sqrt(x*x+y*y);
        int a = 2*(int)Math.ceil(d);
        if(a==2*d){
            a=a+1;
        }
        System.out.println(a);
    }
}
0