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: 112ms
Memory: 21444kB
Author: shanzhenyu
In contest: 1087

m = [31,28,31,30,31,30,31,31,30,31,30,31]
arr = map(int,raw_input().strip().split())
if(arr[1] == 12 and arr[2] == 31):
	print arr[0]+1,
else:
	print arr[0],

if(arr[2] >= m[arr[1]-1]):
	if (arr[0]%4==0 and arr[0]%100!=0)or(arr[0]%400==0):
		if arr[2] == 29:
			print (arr[1] + 1)%12,1
		else:
			print arr[1],29
	else:
		print (arr[1] + 1)%12,1
else:
	print arr[1],arr[2]+1