10 条题解

  • 1
    @ 2023-9-16 21:17:42
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int c;
        cin >> c;
        for (int i = 0 ; i < c ; i++)
        {
            if(i % 2 == 0 && i % 3 != 0)
            {
                cout << i << endl;
            }
        }
        if(c % 2 == 0 && c % 3 != 0)
        {
            cout << c;
        }
        
        return 0;
    }
    

    A

    • 0
      @ 2024-4-22 20:19:52

      so easy!!这题太简单了

      #include<bits/stdc++.h>
      using namespace std;
      int n;
      int main()
      {
          cin>>n;
          for(int i=1;i<=n;i++)
          {
              if(i%2==0&&i%3!=0)
              {
                  cout<<i<<endl;
              }
          }
          return 0;
      }
      
      
      • 0
        @ 2023-10-28 19:15:17
        #include <iostream>
        using namespace std;
        int main(){
            int n;
            cin>>n;
            for(int i=1;i<=n;i++)if(!(i%2)&&i%3)cout<<i<<endl;
            return 0;
        }
        
        • 0
          @ 2023-10-4 19:30:46
          #include<bits/stdc++.h>
          using namespace std;
          int n;
          int main()
          {
              cin>>n;
              for(int i=1;i<=n;i++)
              {
                  if(i%2==0&&i%3!=0)
                  {
                      cout<<i<<endl;
                  }
              }
              return 0;
          }
          
          • 0
            @ 2023-8-19 20:36:29

            半夜打卡第8题

            #include <bits/stdc++.h>
            using namespace std;
            int main()
            {
                int n;
                cin >> n;
                for (int i = 1; i <= n; i++)
                    if ((i % 2 == 0) && (i % 3 != 0)) 
                        cout << i << endl;
                return 0;
            }
            
            • 0
              @ 2023-8-1 16:00:15

              so easy~~

              #include<bits/stdc++.h>
              using namespace std;
              int main(){
              	int n;cin>>n;
              	for(int i=1;i<=n;i++){
              		if(i%2==0&&i%3!=0){
              			cout<<i<<endl;
              		}
              	}	
              	return 0;
              }
              
              • 0
                @ 2023-7-25 14:38:57
                #include <bits/stdc++.h>
                using namespace std;
                int main(){
                    int n;
                    cin >> n;
                    for (int i = 1; i <= n; i++) if (i % 2 == 0 && i % 3 != 0) cout << i << "\n";
                }
                
                • 0
                  @ 2022-12-16 20:52:10
                  #include <iostream>//hetao3097453
                  using namespace std;
                  int main()
                  {
                      int n;
                      cin >> n;
                      for(int i = 1;i <= n;i++)
                      {
                          if(i % 2 == 0 && i % 3 != 0)
                          {
                              cout << i << endl;
                          }
                      }
                      return 0;
                  }
                  
                  
                  • 0
                    @ 2022-11-26 22:12:22
                        for(int i = 1;i<=n;i++)
                        {
                            if(i%2==0 && i%3!=0)
                            {
                                ...
                            }
                        }
                    
                    • -2
                      @ 2023-5-24 19:03:03
                      {
                          int n;
                          cin >> n;
                          for (int i = 1; i <= n; i++)
                          {
                              if (i % 2 == 0 && i % 3 != 0)
                              {
                                  cout << i << endl;
                              }
                          }
                          return 0;
                      }
                      

                      头文件自己打

                      • @ 2023-5-24 19:04:05

                        补充:

                        #include <bits/stdc++.h>
                        using namespace std;
                        int main()
                        {
                            int n;
                            cin >> n;
                            for(int i = 1; i <= n; i++)
                            {
                                if(i % 2 == 0 && i % 3 != 0)
                                {
                                    cout << i << endl;
                                }
                            }
                            return 0;
                        }
                        
                      • @ 2023-5-24 19:05:11

                        请放心食用

                    • 1

                    【入门】输出是2的倍数,但非3的倍数的数

                    信息

                    ID
                    696
                    时间
                    1000ms
                    内存
                    64MiB
                    难度
                    2
                    标签
                    递交数
                    238
                    已通过
                    140
                    上传者