month, day, year,time = input().split()
day = int(day[:-1])
year = int(year)
hour, minute = map(int, time.split(':'))
#print(month,day, year, hour, minute)
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
day_months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
i=0
total_day = 0
if year%400 == 0 or (year%4 == 0 and year%100 != 0):
day_months[1] += 1
while(months[i]!=month):
total_day+=day_months[i]
i+=1
total_day = total_day + day-1
total_minute =total_day * 24 * 60 + hour*60 + minute
one_y_minute = sum(day_months) * 24 * 60
ans = total_minute / one_y_minute * 100
print(ans)
먼저 처음에 틀렸던 부분은 윤년을 문제 내용에 없길래 고려안했는데 해줘야했다...ㅎㅎ
이정도는 알아서 해줘야 하나보다....
아무튼 윤년이면 각 월별 날짜 수를 넣어준 리스트에서 2월달에 해당되는 날짜를 +1 해준다.
그리고 해당 문제에서 입력 예시가 분 단위까지 주므로 해당 시점까지의 total_minute/1년의 total_minute *100 하는 방식으로 구해주었다.