72 条题解

  • 72
    @ 2022-5-21 21:05:20

    先判断后输出,面积输出,可以不放入if-else中,上代码!

        #include <bits/stdc++.h>
        using namespace std;
        int main()
        {
            int a,b;
            cin >> a >> b;
            if (a==b)//判断条件
            {
                cout <<"Y"<<endl;//注意引号
            }
            else
            {
                cout <<"N"<<endl;
            }
            cout << a*b;
            return 0;
        }
    

    日常第二十题,嗨害嗨~~~

    • @ 2022-5-22 15:59:34

      从第二十题以后,我的题解会故意错两个地方,或少给代码因为有人用了非常那个的手段(复制题解还不点赞(woyinggaimeishuocuoba)(kaigewanxiao))复制者请注意!!!为什么复制不点赞?(bushi

    • @ 2022-8-19 16:59:17

      一手交赞一手交(代)码?(bushi

    • @ 2022-8-21 11:55:40

      xiaoshi@

    • @ 2022-8-22 8:10:10
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int a,b;
          cin>>a>>b;
          if(a==b)
          {
              cout<<"Y"<<endl<<a*a;
              return 0;
          }
          cout<<"N"<<endl<<a*b;
          return 0;
      }
      
      
    • @ 2022-8-24 10:23:34

      rrr

    • @ 2022-8-24 10:24:56

      😕 ###### 6666666666666666666666666666666666666666666666666666

    • @ 2022-12-3 15:40:12

      吧上面endl去掉把下面改成 cout <<endl<< a*b;可以减少四个字符(

    • @ 2023-8-1 13:48:13

      怎么发布代码啊?????????????????????????????????????????????????????????

    • @ 2023-8-3 22:10:13

      @ 我也想问

    • @ 2023-8-8 20:48:56

      可以不写return 0; 如

      #include <iostream>
      using namespace std;
      int main()
      {
          int x,y;
          cin>>x>>y;
          if (x==y)
          {
              cout<<"Y"<<endl;
          }
          else
          {
              cout<<"N"<<endl;
          }
          cout<<x*y;
      }
      
  • 32
    @ 2022-8-17 14:50:06
    //这道题挺简单的,就是用一个if语句加上输出就行了,来,上代码!
    #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;
        }
        return 0;
    }
    
    //编码不易,先点赞,在抱走哦😄 
    
    • @ 2022-8-24 10:24:15

      wk

    • @ 2023-8-8 20:49:29

      可以不写return 0; 如

      #include <iostream>
      using namespace std;
      int main()
      {
          int x,y;
          cin>>x>>y;
          if (x==y)
          {
              cout<<"Y"<<endl;
          }
          else
          {
              cout<<"N"<<endl;
          }
          cout<<x*y;
      }
      
  • 9
    @ 2023-8-17 17:53:01

    不会吧,这么简单 应该都会吧......(先 后看!养成习惯!)

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n,m;
        cin>>n>>m;
        if(n==m)
        {
            cout<<'Y'<<endl<<n*m;
        }
        else
        {
            cout<<"N"<<endl<<n*m;
        }
        return 0;
    }
    

    制作不易,给个赞吧,球球了...... 有什么问题,联系我,邮箱是ASheepBoy_Bed@163.com

    • 1
      @ 2024-5-3 13:33:02
      #include<iostream>
      using namespace std;
      int main()
      {
          int a,b;//定义
          cin>>a>>b;//输出
          if(a!=b)//如果不是正方形
          {
              cout<<"N"<<endl<<a*b;
          }
          else//否则是正方形
          {
              cout<<"Y"<<endl<<a*b;
          }
          return 0;
      }
      先赞❤️ ,后拿👀️ 
      谢了
      
      • 1
        @ 2024-1-29 22:25:59

        点个赞吧

        #include <bits/stdc++.h> 
        using namespace std;
        int main()
        {
            int a, b;
            cin >> a >> b;//输入两条边长
            if (a == b)//判断是否是正方形
            {
                cout << "Y" << endl;//注意要换行
            }
            else
            {
                cout << "N" << endl;//注意要换行
            }
            cout << a * b;//输出面积
            return 0;
        }
        
        • 1
          @ 2024-1-25 21:38:00

          先赞后看,养成习惯! 上代码😄 !

          #include <bits/stdc++.h> 
          using namespace std;
          int a,b;
          int main()
          {
              cin>>a>>b;//输入边长
              if(a==b)//如果是正方形,即两条边相等
              {
                  cout<<"Y";//输出"Y"
              }
              else//如果不是
              {
                  cout<<"N";//输出"N"
              }
              cout<<endl<<a*b;//输出面积(注意要换行)
              return 0;
          }
          

          100分通过! image

          • 1
            @ 2023-11-21 19:21:46
            #include <bits/stdc++.h>
                using namespace std;
                int main()
                {
                    int a,b;
                    cin >> a >> b;
                    if (a==b)//判断条件
                    {
                        cout <<"Y"<<endl;//注意引号
                    }
                    else
                    {
                        cout <<"N"<<endl;
                    }
                    cout << a*b;
                    return 0;
                }
            
            • 1
              @ 2023-11-21 19:21:14

              👎

              • 1
                @ 2023-11-21 19:21:06
                #include <bits/stdc++.h>
                    using namespace std;
                    int main()
                    {
                        int a,b;
                        cin >> a >> b;
                        if (a==b)//判断条件
                        {
                            cout <<"Y"<<endl;//注意引号
                        }
                        else
                        {
                            cout <<"N"<<endl;
                        }
                        cout << a*b;
                        return 0;
                    }
                
                • 1
                  @ 2023-10-5 20:34:04

                  小红书名:知秋一夜 【绿色少女头像】,点赞,收藏,关注(基本操作了啊)

                  #include <bits/stdc++.h>
                  using namespace std;
                  int main()
                  {
                      int n,m;
                      cin>>n>>m;
                      if(n==m)
                      {
                          cout<<'Y'<<endl<<n*m;
                      }
                      else
                      {
                          cout<<"N"<<endl<<n*m;
                      }
                  }
                  

                  复制代码不点赞,我变鬼都来弄死你(╯▔皿▔)╯

                  • 1
                    @ 2023-9-24 9:13:59
                    #include<bits/stdc++.h>
                    using namespace std;
                    int main()
                    {
                        int c,v;
                        cin >> c >> v;
                        if (c==v)
                        {
                            cout <<"Y"<<endl;
                        }
                        else
                        {
                            cout <<"N"<<endl;
                        }
                        cout << c*v;
                        return 0;
                    }//A
                    
                    • 1
                      @ 2023-7-23 22:29:27
                      #include <bits/stdc++.h>
                      using namespace std;
                      
                      int main()
                      {
                          int a , b;
                          cin >> a >> b;
                          if(a == b)//判断是否为正方形(两条边相等)
                          {
                              cout << "Y" << endl;
                          }
                          else//不是
                          {
                              cout << "N" << endl;
                          }
                          cout << a * b;//无论是不是正方形都要输出面积 两边的积
                      
                          return 0;
                      }
                      
                      • 1
                        @ 2023-7-20 20:32:46

                        简单if判断真的是easy

                        #include<bits/stdc++.h>
                        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;
                        	}
                        	
                        	return 0;
                        }
                        
                        • 1
                          @ 2023-7-7 20:09:20

                          超级简单!注释版 image

                          • 1
                            @ 2023-6-4 18:31:26
                            #include <iostream>
                            using namespace std;
                            int main()
                            {
                                int a,b;
                                cin>>a>>b;
                                if(a==b)
                                {
                                    cout<<"Y"<<endl;
                                }    
                                else
                                {
                                    cout<<"N"<<endl;
                                }
                                cout<<a*b<<endl;
                                return 0;
                            }
                            

                            先判断是"Y"还是"N",再输出面积。

                            • 1
                              @ 2023-4-29 9:06:24
                              #include<bits/stdc++.h>
                              using namespace std;
                              int main(){
                                  int x,y;
                                  cin >> x >> y;
                                  if(x == y) cout << "Y" << endl << x * y;
                                  else cout << "N" << endl << x * y;
                                  return 0;
                              }
                              

                              鸡你太美

                            • 0
                              @ 2024-6-10 15:49:30
                              #include <bits/stdc++.h>
                                  using namespace std;
                                  int main()
                                  {
                                      int a,b;
                                      cin >> a >> b;
                                      if (a==b)//判断条件
                                      {
                                          cout <<"Y"<<endl;//注意引号
                                      }
                                      else
                                      {
                                          cout <<"N"<<endl;
                                      }
                                      cout << a*b;
                                      return 0;
                                  }
                              
                              • 0
                                @ 2024-6-10 15:48:47
                                #include <bits/stdc++.h>
                                    using namespace std;
                                    int main()
                                    {
                                        int a,b;
                                        cin >> a >> b;
                                        if (a==b)//判断条件
                                        {
                                            cout <<"Y"<<endl;//注意引号
                                        }
                                        else
                                        {
                                            cout <<"N"<<endl;
                                        }
                                        cout << a*b;
                                        return 0;
                                    }
                                
                                • 0
                                  @ 2024-2-25 11:34:33

                                  #include <bits/stdc++.h> using namespace std; int main() { int a,b,n=0; cin >> a >> b; if (a != b) { cout << "N"<<endl; } else { cout << "Y"<<'\n'; } n = a*b; cout << n; return 0; }

                                  • 0
                                    @ 2024-2-23 12:23:49

                                    #include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; if(a=b) { cout<<"Y"<<endl; } else { cout<<"N"<<endl; } cout<<a*b; return 0; } 各位帮忙看看哪里错了?

                                    信息

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