관리 메뉴

솜씨좋은장씨

[BaekJoon] 27001번 : Bovine Birthday (Python) 본문

Programming/코딩 1일 1문제

[BaekJoon] 27001번 : Bovine Birthday (Python)

솜씨좋은장씨 2023. 1. 9. 13:09
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 Bovine Birthday 입니다.

 

27001번: Bovine Birthday

Bessie asked her friend what day of the week she was born on. She knew that she was born on 2003 May 25, but didn't know what day it was. Write a program to help. Note that no cow was born earlier than the year 1800. Facts to know: January 1, 1900 was on a

www.acmicpc.net

👨🏻‍💻 코드 ( Solution )

from datetime import datetime

def bovine_birthday(year, month, day):
    week_day_list = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]
    return week_day_list[datetime(year=year, month=month, day=day).weekday()]

if __name__ == "__main__":
    year, month, day = map(int, input().split())
    print(bovine_birthday(year=year, month=month, day=day))
 

GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07

1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.

github.com

Comments