結果

問題 No.1027 U+1F4A0
ユーザー yomo3yomo3
提出日時 2020-05-08 14:24:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 1,851 ms
コンパイル使用メモリ 71,900 KB
実行使用メモリ 56,476 KB
最終ジャッジ日時 2023-09-16 08:26:50
合計ジャッジ時間 5,818 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,792 KB
testcase_01 AC 120 ms
55,972 KB
testcase_02 AC 121 ms
54,016 KB
testcase_03 AC 120 ms
56,308 KB
testcase_04 AC 121 ms
56,080 KB
testcase_05 AC 120 ms
56,032 KB
testcase_06 AC 121 ms
56,216 KB
testcase_07 AC 122 ms
55,780 KB
testcase_08 AC 121 ms
56,156 KB
testcase_09 AC 120 ms
55,932 KB
testcase_10 AC 118 ms
56,064 KB
testcase_11 AC 119 ms
55,648 KB
testcase_12 AC 118 ms
55,516 KB
testcase_13 AC 120 ms
55,672 KB
testcase_14 AC 118 ms
55,720 KB
testcase_15 AC 121 ms
56,476 KB
testcase_16 AC 121 ms
56,008 KB
testcase_17 AC 120 ms
55,660 KB
testcase_18 AC 120 ms
55,940 KB
testcase_19 AC 121 ms
56,248 KB
testcase_20 AC 120 ms
54,180 KB
testcase_21 AC 120 ms
55,772 KB
testcase_22 AC 122 ms
55,720 KB
testcase_23 AC 122 ms
55,512 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 < D1 || 2 * D1 < D2) {
            ans = 0;
        } else if (D1 == D2 || 2 * D1 == D2) {
            ans = 4;
        } else {
            ans = 8;
        }
        System.out.println(ans);
    }
}
0