72 条题解

  • -1
    @ 2023-8-1 13:47:33

    真爱粉误入 #include <iostream> using namespace std; int main() { int i,k; cin>>i>>k; if (i==k) { cout<<"Y"<<endl<<ik; } else { cout<<"N"<<endl<<ik; } return 0; }

    • -1
      @ 2023-7-17 13:59:04
      #include <iostream>
      using namespace std;
      
      int main() {
           int num1, num2;
      
           // 输入两个整数
           cin >> num1 >> num2;
      
           // 计算面积
           int area = num1 * num2;
      
           // 判断是否是正方形
           if (num1 == num2) {
                cout << "Y" << endl;
           } 
           else {
                cout << "N" << endl;
           }
      
          // 输出面积
          cout << area << endl;
          return 0;
      }
      
      • -1
        @ 2022-9-1 16:18:00

        int <ioaw avvzvaavavaav

        • -1
          @ 2022-8-30 10:46:24

          //这道题挺简单的,上代码!!!!!!!!!!!!!!! #include<bits/stdc++.h>//请点一个宝贵的赞!!!!!!!!!!!!!!!!!!! using namespace std; int main() { int a,b; cin>>a>>b; if(a==b) { cout<<"Y"<<endl<<ab; } else { cout<<"N"<<endl<<ab; } return 0; }

          • -1
            @ 2022-8-17 19:28:41

            先判断矩形的两条边是否相等,相等是正方形,输出Y,不相等是长方形,输出N。再把面积一算,不就出来了?🎉️ ,上代码:

            #include 
            using namespace std;
            int main()
            {
                int n, m;
                cin >> n >> m;
                if (n == m)
                {
                    cout << "Y" << endl;
                }
                else
                {
                    cout << "N" << endl;
                }
                cout << n * m;
                return 0;
            }
            
            • -1
              @ 2022-8-17 19:24:24
              #include <iostream>
              using namespace std;
              int main()
              {
                  int a,b;
                  cin >> a >> b;
                  if (a == b)
                  {
                      cout << "Y" << endl;
                      cout << a * b;
                  }
                  else
                  {
                      cout << "N" << endl;
                      cout << a * b;
                  }
              }
              
              
              • -2
                @ 2022-7-21 21:37:04

                int a,b; cin >> a >> b; if (a==b)//判断条件 { cout <<"Y"<<endl;//注意引号 } else { cout <<"N"<<endl; } cout << a*b;

                • -2
                  @ 2022-7-20 11:02:19
                  #include <iostream>
                  using namespace std;
                  int main()
                  {
                      int a,b;
                      cin >> a >> b;
                      if (a==b)
                      {
                          cout << "Y" << endl << a*b;
                      }
                      else
                      {
                          cout << "N" << endl << a*b;
                      }
                  }
                  
                  • -2
                    @ 2022-7-14 15:01:53

                    #include <iostream> using namespace std; int main() { int a,b; cin >> a >> b; if (a==b) { cout << "Y" << endl << ab; } else { cout << "N" << endl << ab; } return 0; }

                    • -2
                      @ 2022-7-13 21:44:28
                      #include <bits/stdc++.h> 
                      using namespace std;
                      int main()
                      {
                          int a,b;
                          cin >> a >> b;
                          if(a == b)//判断是否为正方形,若a == b,是正方形,输出Y;否则,为矩形,输出N。
                          {
                              cout << "Y" << endl;
                          }
                          else
                          {
                              cout << "N" << endl;
                          }
                          cout << a*b << endl;//输出面积
                          return 0;
                      }
                      

                      点个赞奥😄

                      • -3
                        @ 2022-5-26 14:29:04

                        题解:输入的两个数相等就是正方形。注意下输出的大小写。

                        • -4
                          @ 2022-8-10 20:53:45
                          #include <iostream>//万能头文件
                          using namespace std;
                          
                          int main()
                          {
                              int a,b;
                              cin>>a>>b;//输入两个值,并存入a,b
                              if (a==b)
                              {
                                  cout<<"Y"<<endl;//判断是否为正方形,判断两条边是否相等
                              }
                              else
                              {
                                  cout<<"N"<<endl;//不是正方形的情况
                              }
                              cout<<a*b;//输出体积
                              return 0;
                          }
                          

                          信息

                          ID
                          652
                          时间
                          1000ms
                          内存
                          16MiB
                          难度
                          4
                          标签
                          递交数
                          8891
                          已通过
                          4396
                          上传者