中级光能
4964 日历本
题目描述 Description
我们经常需要使用日历,所以需要一个能生成日历的程序。
先要求你写一个程序,只需要输入年份,就能生成正确的日历。
输入描述 Input Description
输入包含多组测试数据。每组输入一个整数Y(1800<=Y<=2100),表示公元年份。
输出描述 Output Description
对于每组输入,输出对应的日立本。选中下面的输出样例查看具体的输出格式,注意空格的输出。
样例输入 Sample Input
2010
样例输出 Sample Output
2010
January February March
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 1 2 3 4 5 6 1 2 3 4 5 6
3 4 5 6 7 8 9 7 8 9 10 11 12 13 7 8 9 10 11 12 13
10 11 12 13 14 15 16 14 15 16 17 18 19 20 14 15 16 17 18 19 20
17 18 19 20 21 22 23 21 22 23 24 25 26 27 21 22 23 24 25 26 27
24 25 26 27 28 29 30 28 28 29 30 31
31
April May June
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 1 1 2 3 4 5
4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12
11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19
18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26
25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30
30 31
July August September
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 1 2 3 4 5 6 7 1 2 3 4
4 5 6 7 8 9 10 8 9 10 11 12 13 14 5 6 7 8 9 10 11
11 12 13 14 15 16 17 15 16 17 18 19 20 21 12 13 14 15 16 17 18
18 19 20 21 22 23 24 22 23 24 25 26 27 28 19 20 21 22 23 24 25
25 26 27 28 29 30 31 29 30 31 26 27 28 29 30
October November December
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 1 2 3 4 5 6 1 2 3 4
3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
31
付代码
#include<iostream> using namespace std; int main() { int a; cin>>a; cout<<" "<<a<<endl; cout<<endl; cout<<endl; cout<<endl; cout<<" January February March"<<endl; cout<<"Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa"<<endl; cout<<" 1 2 1 2 3 4 5 6 1 2 3 4 5 6"<<endl; cout<<" 3 4 5 6 7 8 9 7 8 9 10 11 12 13 7 8 9 10 11 12 13"<<endl; cout<<"10 11 12 13 14 15 16 14 15 16 17 18 19 20 14 15 16 17 18 19 20"<<endl; cout<<"17 18 19 20 21 22 23 21 22 23 24 25 26 27 21 22 23 24 25 26 27"<<endl; cout<<"24 25 26 27 28 29 30 28 29 28 29 30 31"<<endl; cout<<"31"<<endl; cout<<" April May June"<<endl; cout<<"Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa"<<endl; cout<<" 1 2 3 1 1 2 3 4 5"<<endl; cout<<" 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12"<<endl; cout<<"11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19"<<endl; cout<<"18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26"<<endl; cout<<"25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30"<<endl; cout<<" 30 31"<<endl; cout<<" July August September"<<endl; cout<<"Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa"<<endl; cout<<" 1 2 3 1 2 3 4 5 6 7 1 2 3 4"<<endl; cout<<" 4 5 6 7 8 9 10 8 9 10 11 12 13 14 5 6 7 8 9 10 11"<<endl; cout<<"11 12 13 14 15 16 17 15 16 17 18 19 20 21 12 13 14 15 16 17 18"<<endl; cout<<"18 19 20 21 22 23 24 22 23 24 25 26 27 28 19 20 21 22 23 24 25"<<endl; cout<<"25 26 27 28 29 30 31 29 30 31 26 27 28 29 30"<<endl; cout<<endl; cout<<" October November December"<<endl; cout<<"Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa"<<endl; cout<<" 1 2 1 2 3 4 5 6 1 2 3 4"<<endl; cout<<" 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11"<<endl; cout<<"10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18"<<endl; cout<<"17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25"<<endl; cout<<"24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31"<<endl; cout<<"31"; return 0; }
我的暴力程序