結果

問題 No.773 コンテスト
ユーザー masamasa
提出日時 2019-01-11 11:26:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 694 bytes
コンパイル時間 3,944 ms
コンパイル使用メモリ 72,488 KB
実行使用メモリ 56,076 KB
最終ジャッジ日時 2023-09-20 16:24:00
合計ジャッジ時間 8,339 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,948 KB
testcase_01 AC 129 ms
55,584 KB
testcase_02 AC 127 ms
56,076 KB
testcase_03 AC 128 ms
55,672 KB
testcase_04 AC 126 ms
55,632 KB
testcase_05 AC 126 ms
55,776 KB
testcase_06 AC 126 ms
55,544 KB
testcase_07 AC 130 ms
55,708 KB
testcase_08 AC 128 ms
55,604 KB
testcase_09 AC 128 ms
55,580 KB
testcase_10 AC 128 ms
55,856 KB
testcase_11 AC 130 ms
55,692 KB
testcase_12 AC 128 ms
55,584 KB
testcase_13 AC 130 ms
55,520 KB
testcase_14 AC 132 ms
55,936 KB
testcase_15 AC 130 ms
55,252 KB
testcase_16 AC 128 ms
55,364 KB
testcase_17 AC 127 ms
55,812 KB
testcase_18 AC 127 ms
55,432 KB
testcase_19 AC 132 ms
55,340 KB
testcase_20 AC 133 ms
55,604 KB
testcase_21 AC 130 ms
55,592 KB
testcase_22 AC 128 ms
55,424 KB
testcase_23 AC 131 ms
55,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int dayBefore = sc.nextInt();
        int dayAfter  = sc.nextInt();
        int[] campDay = {23,24,25};
        int answer    = campDay.length; 
         
        if (23 >= dayBefore && 25 <= dayAfter) {
            System.out.println(0);
            System.exit(0);
        }
        
        for (int day : campDay) {
            if (!(day < dayBefore) && !(day > dayAfter)) {
                answer--;
            }
        }
        
        System.out.println(answer);
    }
}
0