1476
1476번 파이썬
import sys input = sys.stdin.readline E,S,M = map(int,input().split()) se,ss,sm,year=0,0,0,0 while 1: se+=1 ss+=1 sm+=1 year+=1 if se>15: se=1 if ss>28: ss=1 if sm>19: sm=1 if se==E and ss==S and sm==M: print(year) break
import sys input = sys.stdin.readline E,S,M = map(int,input().split()) se,ss,sm,year=0,0,0,0 while 1: se+=1 ss+=1 sm+=1 year+=1 if se>15: se=1 if ss>28: ss=1 if sm>19: sm=1 if se==E and ss==S and sm==M: print(year) break