111 条题解

  • -1
    @ 2023-9-3 20:26:03
    #include <iostream>
    using namespace std;
    int main()
    {
    	int n;
    	cin >> n;
        if(n<10)
        {
        cout<<"A"<<endl;
        }
        if(n>=10&&n<20)
        {
        cout<<"B"<<endl;
    	}
    	if(n>=20&&n<40)
    	{
     	 cout << "C"<<endl;
    	}
        if(n>=40&&n<50)
        {
        cout<<"D"<<endl;
    	}
    	if(n>=50)
    	{
     	 cout << "E"<<endl;
    	}
    	return 0;
    }
    点赞再看!!!
    
    • -1
      @ 2023-8-30 12:19:44

      我是新手

      #include<iostream>
      using namespace std;
      int main()
      {
          int a;
          cin>>a;
          if(a<10)
          {
              cout<<"A";
          }
          if(a>=10)
          {
              if(a<20)
              {
                  cout<<"B";
              }
          }
          if(a>=20)
          {
              if(a<40)
              {
                  cout<<"C";
              }
          }
          if(a>=40)
          {
              if(a<50)
              {
                  cout<<"D";
              }
          }
          if(a>=50)
          {
              if(a<80)
              {
                  cout<<"E";
              }
          }
          return 0;
      }
      
      • -1
        @ 2023-8-27 22:33:38
        #include <bits/stdc++.h>//万能开头
        using namespace std;
        double n;//题目中有误导,虽然有五种型号,但只要定义一个变量就行了//没有说明是整数还是小数,所以建议用“double”
        int main()
        {
            cin>>n;//输入变量
            if(n<10)//if,else if,else语句(有点长)
            {
                cout<<"A";
            }
            else if(n>=10&&n<20)//“&&”表示以及(and)
            {
                cout<<"B";
            }
            else if(n>=20&&n<40)
            {
                cout<<"C";
            }
            else if(n>=40&&n<50)
            {
                cout<<"D";
            }
            else
            {
                cout<<"E";
            }
            return 0;
        }
        //一手交赞,一手交货(代码)
        
        
        
        
        
        
        //核桃hetao1609095编程
        //水印
        
        • -1
          @ 2023-8-26 15:27:47

          #include <iostream> using namespace std; int main() { int n; cin>>n; if (n<10) { cout<<"A"<<endl; } else if(n>=10 and n<20) { cout<<"B"<<endl; } else if(n>=20 and n<40) { cout<<"C"<<endl; } else if(n>=40 and n<50) { cout<<"D"<<endl; } else if(n>=50 and n<80) { cout<<"E"<<endl; } return 0; }

          • -1
            @ 2023-8-18 16:38:25

            求赞

            #核心代码
            木有开头
            int a;
            cin >> a;
            if (a< )
            {
            cout << " ";
            }
            if (a<  and a>= )
            大于等于  并且小于  的用
            {
            cout << "    ";
            }
            
            重要数据长腿跑了
            • -1
              @ 2023-8-17 18:02:25

              我哪错了 求解 #include <iostream> using namespace std; int main() { int A,B,C,D,E; cin>>A>>B>>C>>D>>E; if(A<10) { cout<<"A"; } if(B<20) { if(B>=10) { cout<<"B"; } } if(C<40) { if(C>=20) { cout<<"C"; } } if(D<50) { if(D>=40) { cout<<"D"; } } if(E<80) { if(E>=50) { cout<<"E"; } } return 0; }

              
              
              • -1
                @ 2023-8-15 21:24:53

                上代码!!!

                #include <iostream>
                using namespace std;
                int main()
                {
                    int n;
                    cin >> n;
                    if (n < 10)
                    {
                        cout << "A";
                    }
                    if (n >= 10)
                    {
                        if (n < 20)
                        {
                            cout << "B";
                        }
                    }
                    if (n >= 20)
                    {
                        if (n < 40)
                        {
                            cout << "C";
                        }
                    }
                    if (n >= 40)
                    {
                        if (n < 50)
                        {
                            cout << "D";
                        }
                    }
                    if (n >= 50)
                    {
                        if (n < 80)
                        {
                            cout << "E";
                        }
                    }
                	return 0;
                }
                
                • -1
                  @ 2023-8-15 15:51:46
                  #include <iostream>
                      using namespace std;
                      int main()
                      {
                          int a;
                          cin >> a;
                          if (a<10)
                          {
                              cout << "A";
                          }
                          if (a<20 and a>=10
                          {
                              cout << "B";
                          }
                          if (a<40 and a>=20)
                          {
                              cout << "C";       
                          }
                          if (a<50 and a>=40)
                          {
                              cout << "D";
                          }
                          if (a<80 and a>=50)
                          {
                              cout << "E";
                          }
                          return 0;
                      }
                  
                  • -1
                    @ 2023-8-13 11:47:18

                    #include <bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if (a>=50 and a<80) { cout<<"E"; } if (a>=40 and a<50) { cout<<"D"; } if (a>=20 and a<40) { cout<<"C"; } if (a>=10 and a<20) { cout<<"B"; } if (a<10) { cout<<"A"; } return 0; }

                    • -1
                      @ 2023-7-30 15:16:41

                      #include <iostream> using namespace std; int main() { int a; cin >> a; if (a<10) { cout << "A"; } if (a<20 and a>=10) { cout << "B"; } if (a<40 and a>=20) { cout << "C"; } if (a<50 and a>=40) { cout << "D"; } if (a<80 and a>=50) { cout << "E"; } }

                      • -1
                        @ 2023-7-24 14:41:28
                        #include <bits/stdc++.h> 
                        using namespace std;
                        int main()
                        {
                            int a;
                            cin >> a;
                            if (a < 10)
                            {
                                cout << "A";
                            }
                            if (a < 20 and a >= 10)
                            {
                                cout << "B";
                            }
                            if (a < 40 and a >= 20)
                            {
                                cout << "C";
                            }
                            if (a < 50 and a >= 40 )
                            {
                                cout << "D";
                            }
                            if (a < 80 and a >= 50)
                            {
                                cout << "E";
                                return 0;
                            }
                        }
                        
                        • -1
                          @ 2023-7-24 14:41:08
                          #include <bits/stdc++.h> 
                          using namespace std;
                          int main()
                          {
                              int a;
                              cin >> a;
                              if (a < 10)
                              {
                                  cout << "A";
                              }
                              if (a < 20 and a >= 10)
                              {
                                  cout << "B";
                              }
                              if (a < 40 and a >= 20)
                              {
                                  cout << "C";
                              }
                              if (a < 50 and a >= 40 )
                              {
                                  cout << "D";
                              }
                              if (a < 80 and a >= 50)
                              {
                                  cout << "E";
                                  return 0;
                              }
                          }
                          
                          • -1
                            @ 2023-7-18 21:25:19
                            #include <iostream>
                            using namespace std;
                            int main()
                            {
                            	int n;
                            	cin >> n;
                                if(n<10)
                                {
                                cout<<"A"<<endl;
                                }
                                if(n>=10&&n<20)
                                {
                                cout<<"B"<<endl;
                            	}
                            	if(n>=20&&n<40)
                            	{
                             	 cout << "C"<<endl;
                            	}
                                if(n>=40&&n<50)
                                {
                                cout<<"D"<<endl;
                            	}
                            	if(n>=50)
                            	{
                             	 cout << "E"<<endl;
                            	}
                            	return 0;
                            }
                            
                            • -1
                              @ 2023-7-10 11:20:01
                              #include <cstdio>
                              using namespace std;
                              int main()
                              {
                                  int n;
                                  scanf ("%d\n", &n);
                                  if (n < 10)
                                      printf("A");
                                  else if (n < 20)
                                      printf("B");
                                  else if (n < 40)
                                      printf("C");
                                  else if (n < 50)
                                      printf("D");
                                  else
                                      printf("E");
                                  return 0;
                              }
                              
                              • -1
                                @ 2023-7-5 20:40:03
                                #include <iostream>
                                using namespace std;
                                int main()
                                {
                                    int n;
                                    cin>>n;
                                    if (n<20)
                                    {
                                        if (n<10)
                                        {
                                            cout<<"A"<<endl;
                                        }
                                        else
                                        {
                                            cout<<"B"<<endl;
                                        }
                                    }
                                    else
                                    {
                                        if (n<50)
                                        {
                                            if (n<40)
                                            {
                                                cout<<"C"<<endl;
                                            }
                                            else
                                            {
                                                cout<<"D"<<endl;
                                            }
                                        }
                                        else
                                        {
                                            cout<<"E"<<endl;
                                        }
                                    }
                                }
                                
                                • -1
                                  @ 2023-7-5 16:02:00
                                  #include <iostream>
                                  using namespace std;
                                  int main()
                                  {
                                      int a;
                                      cin >> a;
                                      if(a<10)
                                      {
                                          cout << "A";
                                      }
                                      else
                                      {
                                          if(a<20)
                                          {
                                              cout << "B";
                                          }
                                          else
                                          {
                                              if(a<40)
                                              {
                                                  cout << "C";
                                              }
                                              else
                                              {
                                                  if(a<50)
                                                  {
                                                      cout << "D";
                                                  }
                                                  else
                                                  {
                                                      cout << "E";
                                                  }
                                              }
                                          }
                                      }
                                      return 0;
                                  }
                                  
                                  • -1
                                    @ 2023-6-26 14:17:04
                                    #include <iostream>
                                    using namespace std;
                                    int main()
                                    {
                                    	int x;
                                        cin>>x;
                                        if(x < 10)
                                        {
                                            cout << "A";
                                        }
                                        else
                                        {
                                            if(x < 20)
                                            {
                                                cout << "B";
                                            }
                                            else
                                            {
                                                if (x < 40)
                                                {
                                                    cout << "C";
                                                }
                                                else
                                                {
                                                    if(x < 50)
                                                    {
                                                        cout << "D";
                                                    }
                                                    else
                                                    {
                                                        if (x < 80)
                                                        {
                                                            cout << "E";
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                        return 0;
                                    }
                                    
                                    • -1
                                      @ 2023-5-2 16:50:58

                                      只需要简简单单的用一个if语句即可

                                      #include <iostream>
                                          using namespace std;
                                          int main()
                                          {
                                              int a;
                                              cin >> a;
                                              if (a<10){
                                                  cout << "A";
                                              }
                                              if (a<20 and a>=10) {
                                                  cout << "B";
                                              }
                                              if (a<40 and a>=20) {
                                                  cout << "C";       
                                              }
                                              if (a<50 and a>=40){
                                                  cout << "D";
                                              }
                                              if (a<80 and a>=50){
                                                  cout << "E";
                                              }
                                              return 0;
                                          }
                                      
                                      • -1
                                        @ 2023-4-22 15:52:17

                                        很简单,不多说,上代码

                                        #include <bits/stdc++.h>
                                        using namespace std;
                                        int main()
                                        {
                                            long long a;
                                            cin>>a;
                                            if (a<10)
                                            {
                                                cout<<"A"<<endl;
                                            }
                                            else
                                            {
                                                if (a>=10 && a<20)
                                                {
                                                    cout<<"B"<<endl;
                                                }
                                                else
                                                {
                                                    if (a>=20 && a<40)
                                                    {
                                                        cout<<"C"<<endl;
                                                    }
                                                    else
                                                    {
                                                        if (a>=40 && a<50)
                                                        {
                                                            cout<<"D"<<endl;
                                                        }
                                                        else
                                                        {
                                                            if (a>=50 && a<80)
                                                            {
                                                                cout<<"E"<<endl;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            return 0;
                                        }
                                        
                                        • -1
                                          @ 2023-3-28 21:22:45
                                          #include<bits/stdc++.h>
                                          using namespace std;
                                          int main()
                                          {
                                              int x;
                                              cin>>x;
                                              if (x<10)
                                                  cout<<"A";
                                              else if (x<20)
                                                  cout<<"B";
                                              else if (x<40)
                                                  cout<<"C";
                                              else if (x<50)
                                                  cout<<"D";
                                              else
                                                  cout<<"E";
                                              return 0;
                                          }
                                          

                                          【入门】找出最经济型的包装箱型号

                                          信息

                                          ID
                                          39
                                          时间
                                          1000ms
                                          内存
                                          16MiB
                                          难度
                                          5
                                          标签
                                          递交数
                                          11191
                                          已通过
                                          4629
                                          上传者