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: 136ms
Memory: 24040kB
Author: 18758239251
In contest: 1087

#-*- coding:UTF-8 -*-
import calendar
n=int(raw_input())
for i in range(0,n):
	y=int(raw_input())
	s=calendar.weekday(y,5,1)
	if s==0:
		print 9
	elif s==1 or s==6:
		print 6
	else:
		print 5