結果

問題 No.1027 U+1F4A0
ユーザー joybeeeejoybeeee
提出日時 2020-05-13 21:58:21
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 421 bytes
コンパイル時間 2,867 ms
コンパイル使用メモリ 71,648 KB
実行使用メモリ 56,020 KB
最終ジャッジ日時 2023-10-12 17:06:25
合計ジャッジ時間 6,815 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,640 KB
testcase_01 AC 130 ms
55,708 KB
testcase_02 AC 128 ms
55,556 KB
testcase_03 AC 129 ms
55,972 KB
testcase_04 AC 131 ms
55,592 KB
testcase_05 AC 127 ms
53,612 KB
testcase_06 AC 128 ms
55,644 KB
testcase_07 AC 129 ms
55,580 KB
testcase_08 AC 127 ms
55,576 KB
testcase_09 AC 128 ms
55,496 KB
testcase_10 AC 132 ms
55,572 KB
testcase_11 AC 132 ms
55,648 KB
testcase_12 AC 129 ms
55,768 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 131 ms
55,776 KB
testcase_17 AC 128 ms
55,792 KB
testcase_18 AC 131 ms
55,804 KB
testcase_19 AC 128 ms
55,748 KB
testcase_20 AC 128 ms
55,740 KB
testcase_21 AC 129 ms
55,744 KB
testcase_22 AC 127 ms
55,808 KB
testcase_23 AC 127 ms
55,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      double D1 = sc.nextInt();
      double D2 = sc.nextInt();
      double d1 = Math.sqrt(D1);
      double d2 = Math.sqrt(D2);

      int res = 0;
      if(D1 == D2 || d1 * 2 == D2) res = 4;
      else if(d1 > Math.sqrt(2) * d2 / 2 && d1 < d2) res = 8;

      System.out.println(res);
  }
}
0