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: 129ms
Memory: 23560kB
Author: leo
In contest: 1087

#!usr/bin/python
#coding=utf-8
import datetime
T = input()
for i in range(T):
	y=input()
	d=datetime.datetime(y,5,1).weekday()
	if d==6 or d==1:
		k=6
	elif d==0:
		k=9
	else:
		k=5
	print k