結果

問題 No.1027 U+1F4A0
ユーザー yomo3yomo3
提出日時 2020-05-08 13:56:00
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 1,968 ms
コンパイル使用メモリ 71,056 KB
実行使用メモリ 56,484 KB
最終ジャッジ日時 2023-09-16 08:26:12
合計ジャッジ時間 6,095 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,600 KB
testcase_01 AC 129 ms
55,584 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 127 ms
55,740 KB
testcase_06 AC 124 ms
55,836 KB
testcase_07 AC 131 ms
55,572 KB
testcase_08 AC 122 ms
56,168 KB
testcase_09 AC 122 ms
55,584 KB
testcase_10 AC 123 ms
55,732 KB
testcase_11 AC 126 ms
55,572 KB
testcase_12 AC 124 ms
55,884 KB
testcase_13 AC 124 ms
55,744 KB
testcase_14 AC 125 ms
55,488 KB
testcase_15 AC 125 ms
55,712 KB
testcase_16 AC 124 ms
55,560 KB
testcase_17 AC 124 ms
55,568 KB
testcase_18 AC 125 ms
55,756 KB
testcase_19 AC 123 ms
56,484 KB
testcase_20 AC 124 ms
55,536 KB
testcase_21 AC 127 ms
55,536 KB
testcase_22 AC 124 ms
55,712 KB
testcase_23 AC 126 ms
55,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int D1 = sc.nextInt();
        int D2 = sc.nextInt();
        int ans;
        if (D2 < 0 || 2 * D1 < D2) {
            ans = 0;
        } else if (D1 == D2 || 2 * D1 == D2) {
            ans = 4;
        } else {
            ans = 8;
        }
        System.out.println(ans);
    }
}
0