結果

問題 No.773 コンテスト
ユーザー skkbevskkbev
提出日時 2018-12-21 22:39:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 630 bytes
コンパイル時間 3,110 ms
コンパイル使用メモリ 71,480 KB
実行使用メモリ 56,236 KB
最終ジャッジ日時 2023-09-20 16:15:39
合計ジャッジ時間 7,140 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,236 KB
testcase_01 AC 122 ms
55,980 KB
testcase_02 AC 122 ms
55,784 KB
testcase_03 AC 121 ms
55,696 KB
testcase_04 AC 121 ms
56,028 KB
testcase_05 AC 121 ms
55,736 KB
testcase_06 AC 122 ms
55,680 KB
testcase_07 AC 120 ms
56,212 KB
testcase_08 AC 121 ms
54,448 KB
testcase_09 AC 120 ms
55,456 KB
testcase_10 AC 120 ms
55,480 KB
testcase_11 AC 122 ms
55,840 KB
testcase_12 AC 120 ms
55,976 KB
testcase_13 AC 122 ms
55,920 KB
testcase_14 AC 122 ms
55,692 KB
testcase_15 AC 122 ms
55,916 KB
testcase_16 AC 122 ms
55,856 KB
testcase_17 AC 121 ms
56,024 KB
testcase_18 AC 126 ms
55,908 KB
testcase_19 AC 122 ms
53,660 KB
testcase_20 AC 122 ms
55,816 KB
testcase_21 AC 122 ms
55,888 KB
testcase_22 AC 122 ms
55,488 KB
testcase_23 AC 122 ms
55,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 3;
        for (int i = a; i <= b; i++) {
            switch (i) {
                case 23:
                    ans--;
                    break;
                case 24:
                    ans--;
                    break;
                case 25:
                    ans--;
                    break;
                default:
                    break;
            }
        }
        System.out.println(ans);
    }
}
0