5 条题解

  • 1
    @ 2023-10-5 18:01:18

    此题主要用到if else语句,比较简单,代码如下:

    #include<iostream>
    using namespace std;
    int main()
    {
        int t;
        cin >> t;
        if(t >= 20 and t <= 30)
        {
            cout << "OK";
        }
        else
        {
            cout << "NO";
        }
        return 0;
    }
    

    第7~14行为核心代码🚀️

    • 1
      @ 2023-8-30 12:00:11
      #include <iostream>
      using namespace std;
      int main()
      {
          int n;
          if (20<=n && n<=30)
          {
              cout << "OK";
          }
          else
          {
              cout << "NO";
          }
          return 0;
      }
      
      • 0
        @ 2023-8-31 15:32:29

        谁有我的代码短?

        #include <bits/stdc++.h>
        using namespace std;
        int main(){
            cout << "NO";
            return 0;
        }
        
        • 0
          @ 2023-4-3 21:35:27

          平平无奇

          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              int t;
              cin>>t;
              if (t<=30&&t>=20)
                  cout<<"OK";
              else
                  cout<<"NO";
              return 0;
          }
          
          • 0
            @ 2022-12-24 16:45:24

            这是本题最离谱的AC代码

            #include <iostream>
            int main()
            {
                std::cout << "NO";
                return 0;
            }//离离原上谱,越来越离谱~~
            
            • @ 2023-4-3 21:35:06

              要不是这题样例少()

          • 1

          信息

          ID
          299
          时间
          1000ms
          内存
          16MiB
          难度
          1
          标签
          递交数
          156
          已通过
          115
          上传者