We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
My approach for the problem. Using the calendar we can reduce our time and number of lines to code and futhermore leverage the inbuilt functions available to us.
import calendar
month , date , year =list(map(int,input().split()))
x = calendar.weekday(year,month,date)
print(calendar.day_name[x].upper())
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Calendar Module
You are viewing a single comment's thread. Return to all comments →
My approach for the problem. Using the calendar we can reduce our time and number of lines to code and futhermore leverage the inbuilt functions available to us.
import calendar
month , date , year =list(map(int,input().split())) x = calendar.weekday(year,month,date) print(calendar.day_name[x].upper())