3 solutions

  • 0
    @ 2023-10-3 21:31:27

    这道题典型的签到题

    #include <bits/stdc++.h>
    using namespace std;
    int main(void)
    {
        int n;
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            if (i%2!=0)
            {
                cout<<"签到"<<endl;
            }
            else if (i%2==0)
            {
                cout<<"QAQ"<<endl;
            }
        }
        return 0;
    }
    
    • 0
      @ 2022-4-5 1:37:10

      水题

      #include <iostream>
      using namespace std;
      int main()
      {
          int n = 0;
          cin >> n;
          int i = 1;
          while(i<=n)
          {
              if(i%2) cout << "签到" << endl;
              else cout << "QAQ" << endl;
              i++;
          }
          return 0;
      }
      
      • 0
        @ 2022-3-7 22:15:38
        #include <stdio.h>
        #include <algorithm>
        #include <math.h>
        using namespace std;
        int n;
        int main() {
            scanf("%d",&n);
            int k=1;
            while(k<=n) {
                if(k&1)
                    printf("签到\n");
                else
                    printf("QAQ\n");
                k++;
            }
            return 0;
        }
        
        
        • 1

        Information

        ID
        26
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        5
        Tags
        # Submissions
        686
        Accepted
        255
        Uploaded By