CCC '15 J1 - Special Day

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
Canadian Computing Competition: 2015 Stage 1, Junior #1

February 18 is a special date for the CCC this year.

Write a program that asks the user for a numerical month and numerical day of the month and then determines whether that date occurs before, after, or on February 18.

  • If the date occurs before February 18, output the word Before.
  • If the date occurs after February 18, output the word After.
  • If the date is February 18, output the word Special.

Input Specification

The input consists of two integers each on a separate line. These integers represent a date in 2015.

The first line will contain the month, which will be an integer in the range from 1 (indicating January) to 12 (indicating December).

The second line will contain the day of the month, which will be an integer in the range from 1 to 31. You can assume that the day of the month will be valid for the given month.

Output Specification

Exactly one of Before, After or Special will be printed on one line.

Sample Input 1


Output for Sample Input 1


Sample Input 2


Output for Sample Input 2


Sample Input 3


Output for Sample Input 3



  • 0
    HARRIBO  commented on Aug. 23, 2019, 1:25 a.m.

    What's wrong with my solution

    • 4
      magicalsoup  commented on Aug. 23, 2019, 10:30 a.m.

      Try this case


  • 3
    adriancerejo  commented on Oct. 28, 2018, 12:38 p.m.

    Didn't even realize the outputs had to be capitalized.

  • -11
    saysuhayl  commented on Oct. 5, 2018, 1:29 a.m.

    This comment is hidden due to too much negative feedback. Click here to view it.

  • -1
    12weareunited  commented on Aug. 29, 2018, 8:56 a.m.

    My program keeps saying error: else without if, why is that HAPPEning?

    • 2
      Arihan10  commented on Dec. 13, 2018, 1:26 p.m.

      @12weareunited You put an else statement without referencing an if statement first. The answer is in the error: else without if.