結果

問題 No.773 コンテスト
ユーザー masa
提出日時 2019-01-11 11:26:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 694 bytes
コンパイル時間 3,848 ms
コンパイル使用メモリ 74,652 KB
実行使用メモリ 54,136 KB
最終ジャッジ日時 2024-07-06 11:29:05
合計ジャッジ時間 5,661 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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