結果

問題 No.773 コンテスト
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-02-19 21:24:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 719 bytes
コンパイル時間 3,228 ms
コンパイル使用メモリ 71,792 KB
実行使用メモリ 56,628 KB
最終ジャッジ日時 2023-08-02 22:13:10
合計ジャッジ時間 8,123 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,984 KB
testcase_01 AC 123 ms
56,072 KB
testcase_02 AC 124 ms
56,628 KB
testcase_03 AC 123 ms
55,828 KB
testcase_04 AC 122 ms
55,768 KB
testcase_05 AC 122 ms
55,852 KB
testcase_06 AC 123 ms
55,828 KB
testcase_07 AC 123 ms
56,072 KB
testcase_08 AC 123 ms
55,928 KB
testcase_09 AC 125 ms
56,100 KB
testcase_10 AC 121 ms
56,400 KB
testcase_11 AC 122 ms
55,920 KB
testcase_12 AC 120 ms
55,536 KB
testcase_13 AC 121 ms
56,232 KB
testcase_14 AC 122 ms
55,832 KB
testcase_15 AC 124 ms
56,204 KB
testcase_16 AC 121 ms
55,832 KB
testcase_17 AC 122 ms
55,520 KB
testcase_18 AC 122 ms
56,028 KB
testcase_19 AC 122 ms
56,172 KB
testcase_20 AC 124 ms
55,872 KB
testcase_21 AC 124 ms
56,128 KB
testcase_22 AC 124 ms
55,700 KB
testcase_23 AC 122 ms
55,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        solve(a,b);
    }
    
    static void solve(int a, int b) {
        boolean [] boo = new boolean [32];
        Arrays.fill(boo, false);
        for(int i=a; i<=b; i++) {
            boo[i] = true;
        }
        int ans = count(boo);
        System.out.println(ans);
    }
    
    static int count(boolean[]boo) {
        int ans = 0;
        final int[] ARRAY = {23, 24, 25};
        for(int i=0; i<ARRAY.length; i++) {
            if(!boo[ARRAY[i]]) ans++;
        }
        return ans;
    }

}
0