打印年历
测试数据来自 Wujiang01/1103
在P1094的基础之上,打印年历。
输入:年份
输出:该年所有月的月历
每月的月历在头部信息(Sun Mon ...)前加入三行内容:
第1行:28个减号
第2行:年、月信息(年和月之间用英文斜杠"/"连接)
第3行:28个减号
月历之间空一行,例如,1月月历打印完,要空一行打印2月月历,...。
测试案例1:
输入:
2021
输出:
----------------------------
2021/1
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
----------------------------
2021/2
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28
----------------------------
2021/3
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
----------------------------
2021/4
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
----------------------------
2021/5
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
----------------------------
2021/6
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
----------------------------
2021/7
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
----------------------------
2021/8
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
----------------------------
2021/9
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
----------------------------
2021/10
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
----------------------------
2021/11
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
----------------------------
2021/12
----------------------------
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31