现在这里膜一下dalao
1 #include <iostream> 2 #include <algorithm> 3 using namespace std; 4 char* s[][7] = { { "1 10", "4 7", "9 12", "6", "2 3 11", "8", "5" }, { "1 4 7", "9 12", "6", "3 11", "2 8", "5", "10" } }; 5 6 int main(){ 7 int y; 8 while (cin >> y){ 9 cout << s[y % 400 == 0 || (y % 100 != 0 && y % 4 == 0)][(6 + (y - 2000) + (y - 1997) / 4 + (y - 2001) / 400 - (y - 2001) / 100) % 7] << endl;; 10 } 11 return 0; 12 }