백준(Python) 풀이/구현

백준(Python) 10768번 특별한 날 풀이

개발윗미 2021. 11. 24. 12:56

Python으로 구현한 10768번 특별한 날 문제 풀이입니다.

 

https://www.acmicpc.net/problem/10768

 

10768번: 특별한 날

마지막 줄에 "Before", "After"나 "Special"을 출력한다.

www.acmicpc.net


month = int(input())
day = int(input())

if month == 2 :
  if day == 18 :
    print('Special')
  elif day < 18 :
    print('Before')
  else :
    print('After')
elif month < 2 :
  print('Before')
else :
  print('After')

 

1. 날짜가 2월 18일이라면 "Special"을 출력한다.

 

2. 날짜가 2월 18일 전이면 "Before"을 출력한다.

 

3. 날짜가 2월 18일 후면 "After"을 출력한다.