97 条题解

  • -1
    @ 2023-8-14 10:23:18
    #include <iostream>
    using namespace std;
    int main()
    {
        int a;
        cin >> a;
        if ((a<100)&&(a>9))//先判断是不是两位数。
        {
            if (a%2==0)//再判断是不是偶数
            {
                cout << "Yes";
            }
            else
            {
                cout << "No";
            }
        }
        else
        {
            cout << "No";
        }
        return 0;
    }
    

    点个赞再走!!

    • -1
      @ 2023-2-3 10:26:34
      #include <bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n;
          cin >> n;
          if(n%2==0/*是偶数*/&&n/2>=5/*最小的两位偶数10÷2=5*/&&n/2<=49/*最大的两位偶数98÷2=49*/){
              cout << "Yes";
          }
          else{
              cout << "No";
          }
          return 0;
      }
      /*               ^
                      / \
                     /   \
                    /     \
                   /       \
                  /         \
                   |        |
                   |   中   |   
          ^        |   国   |       ^
         /  \     |    航    |    /  \
        /    \   |     天     |  /    \
       /      \ |             | /      \
      //////////               \\\\\\\\\\
      |        |               |        |
      |        |               |        |
      |        |               |        |
      |        |               |        |
      |        |               |        |
      |        |               |        |
      |        |               |        |
      /||||||||\ \           / /||||||||\
      |||||||||| /|||||||||||\ ||||||||||
                /|||||||||||||\
               /|||||||||||||||\
               |||||||||||||||||
               先点赞       后搬运
                                         */
      
      • -1
        @ 2022-12-25 10:20:09

        我的代码才是最简洁的

        #include <iostream>
        int main()
        {
            std::cout << "No";
            return 0;
        }
        
      • -1
        @ 2022-11-7 22:04:49
        #include <iostream>
        using namespace std;
        int main()
        {
            int n;
            cin >> n;
            if(n / 10 > 0 and n / 10 < 10)
            {
                if(n % 2 == 0)
                {
                    cout << "Yes";
                }
                else
                {
                    cout << "No";
                }
            }
            else
            {
                cout << "No";
            }
            return 0;
        }
        
        • -1
          @ 2022-11-7 22:04:22
          #include <iostream>
          using namespace std;
          int main()
          {
              int n;
              cin >> n;
              if(n / 10 > 0 and n / 10 < 10)
              {
                  if(n % 2 == 0)
                  {
                      cout << "Yes";
                  }
                  else
                  {
                      cout << "No";
                  }
              }
              else
              {
                  cout << "No";
              }
              return 0;
          }
          
          • -1
            @ 2022-10-24 12:47:18

            #include <iostream> using namespace std; int main() { int x; cin >> x; if ((x % 2 == 0) and (x >= 10) and (x < 99)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }

            • -1
              @ 2022-8-30 19:31:43
              #include<bits/stdc++.h>
              using namespace std;
              int main()
              {
                  int a,n;
                  n=a/100;
                  cin>>a;
                  if(a%2==0 and n==0){
                      cout<<"Yes";
                  }
                  else
                      cout<<"No";
              }
              
              • -1
                @ 2022-8-30 13:04:24

                #include<bits/stdc++.h> using namespace std; int main() { int a; cin >> a; if ((a / 10) < 10 && a % 2 == 0 && a / 10 > 0) cout << "Yes"; else cout << "No"; return 0; }

                
                
                • -1
                  @ 2022-8-30 10:50:32
                  #include <bits/stdc++.h>
                  using namespace std;
                  int main()
                  {
                      int a;
                      cin >> a;
                      if ((a / 10) < 10 && a % 2 == 0 && a / 10 > 0){
                          cout << "Yes";
                  }
                      else{
                          cout << "No";
                  }
                      return 0;
                  }
                  
                  • -1
                    @ 2022-8-25 18:29:15
                    #include<iostream>
                    using namespace std;
                    int main()
                    {
                        int a;
                        cin >> a;
                        if (a % 2 == 0)
                        {
                            if (a < 100)
                            {
                                if (a > 9)
                                {
                                    cout << "Yes";
                                }
                                else
                                {
                                    cout << "No";
                                }
                            }
                            else
                            {
                                cout << "No";
                            }
                        }
                        else
                        {
                            cout << "No";
                        }
                    
                    }
                    
                    • -1
                      @ 2022-8-22 21:55:26

                      嘻嘻,简洁的代码来喽!!

                      image

                      #include<bits/stdc++.h>
                      using namespace std;
                      int main(){
                          int n;
                          cin >> n;
                          if(n <= 99 && n >= 10 && n % 2 == 0) cout << "Yes";
                          else cout << "No";
                      }
                      
                      • -1
                        @ 2022-8-3 12:49:44

                        先赞后看,养成习惯!

                        #include <bits/stdc++.h> 
                        using namespace std;
                        int main()
                        {
                            int n;
                            cin >> n;
                            if (n % 2 == 0 and n > 9 and n < 100)
                            //判断是否为偶,非一&三位数
                            {
                                cout << "Yes";//是
                            }
                            else
                            {
                                cout << "No";//否
                            }
                            return 0;
                        }
                        
                        • -1
                          @ 2022-6-9 16:16:05

                          #include <bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a/10<10){ if(a/10>0){ if(a%2==0){ cout<<"Yes"; }else{ cout<<"No"; } }else{ cout<<"No"; } }else{ cout<<"No"; } return 0; }

                          • -1
                            @ 2022-5-26 14:45:20

                            题解:两位数并且是偶数 判断是两位数

                            n/10<10;//十位数一定是0~9.
                            n/10>0;//int类型,n除以10大于0,是为了防止是一位数。
                            

                            最后判断偶数

                            • -1
                              @ 2022-5-15 9:54:14

                              #include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; if(n/10<10&&n/10>=1) { if(n%2==0) { cout<<"Yes"; } else { cout<<"No"; } } else { cout<<"No"; } return 0; }

                              • -2
                                @ 2023-4-29 9:10:43
                                #include <bits/stdc++.h>
                                using namespace std;
                                int main()
                                {
                                    cout << "No";
                                    return 0;
                                }
                                

                                简单易懂

                                • -4
                                  @ 2022-7-17 7:42:47

                                  我悟了

                                  信息

                                  ID
                                  653
                                  时间
                                  1000ms
                                  内存
                                  16MiB
                                  难度
                                  6
                                  标签
                                  递交数
                                  12241
                                  已通过
                                  3816
                                  上传者