Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第三次作业
End: Apr, 23, 2017 14:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 114ms
Memory: 21444kB
Author: leo
In contest: 1087

days ={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
y,m,d=map(int,raw_input().strip().split())
r=0
if (y%100==0 and y%400==0) or (y%4==0 and y%100<>0):
	r=1
if r==1 and m==2:
	mDays=days[m]+r+1
else:
	mDays=days[m]+1
d=(d+1)%mDays
if d==0:
	d=1
	m=(m+1)%13
	if m==0:
		m=1
		y=y+1
print y,m,d