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

Problem_ID: A
Result: Accepted
Time: 126ms
Memory: 23560kB
Author: 13065754237
In contest: 1087

import datetime
tcase = int(raw_input().strip())  
for case in range(tcase):  
	a = int(raw_input())
	n = int(datetime.datetime(a,5,1).weekday())
	if n == 0:
		print 9
	elif n == 1 or n == 6:
		print 6
	else:
		print 5