Solution for CCC '15 J1 - Special Day in Java 8


Nov. 5, 2019 1.208344 seconds Java 8
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        
        if(a == 2){
            
            if(b == 18){
                System.out.println("Special");
            }else if(b > 18){
                System.out.println("After");
            }else{
                System.out.println("Before");
            }
            
        }else if(a > 2){
            System.out.println("After");
        }else{
            System.out.println("Before");
        }
    }
}

Editorial


No editorial for this problem. :(

Original Problem


You can view the original page for this problem on the DMOJ.