全部评论 6

  • #include <iostream>
    using namespace std;
    
    int main() {
        int month, day;
        cin >> month >> day;
    
        switch (month) {
            case 1: case 3: case 5: case 7: case 8: case 10: case 12:
                switch (day % 2) {
                    case 0:
                        cout << "Oh!No!" << endl;
                        break;
                    case 1:
                        cout << "Play!" << endl;
                        break;
                }
                break;
            case 4: case 6: case 9: case 11:
                switch (day % 2) {
                    case 0:
                        cout << "Play!" << endl;
                        break;
                    case 1:
                        cout << "Oh!No!" << endl;
                        break;
                }
                break;
            case 2:
                switch (day % 2) {
                    case 0:
                        cout << "Play!" << endl;
                        break;
                    case 1:
                        cout << "Oh!No!" << endl;
                        break;
                }
                break;
        }
    
        return 0;
    }
    

    2024-12-21 来自 北京

    0
  • M1???

    2024-12-20 来自 浙江

    0
  • ???

    2024-12-20 来自 浙江

    0
  • 语法有问题 应该是 M1||M3||M5||M7||M8||M10||M==12

    2024-12-06 来自 浙江

    0
  • 不一定要这样
    你可以加个奇偶判断

    2024-11-24 来自 江苏

    0
  • 不是哥们,你这语法完全错误呀

    2024-11-24 来自 江苏

    0

热门讨论