2 条题解

  • 2
    @ 2022-5-28 17:44:17

    形式主义,任何时候都是要不得的

    using namespace std;
    int main()
    {
      int a,b,c,d[3];
      cin>>a>>b>>c;
      d[0]=a;
      d[1]=b;
      d[2]=c;
      sort(d,d+3);
      cout<<"The maximum number is : "<<d[2]<<endl<<"The minimum number is : "<<d[0]<<endl;
      //╰(*°▽°*)╯
      return 0;
    }
    

    这个输出格式看着好不舒服啊

    一股子官味

    • 1
      @ 2022-8-15 20:07:15
      using namespace std;
      
      int main(){
      	int a,b,c;
      	cin>>a>>b>>c;
      	for(int i=1;i<=1;i++){
      		if(a>b && a>c){
      			cout<<"The maximum number is : "<<a<<endl;
      		}	
      		if(b>a && b>c){
      			cout<<"The maximum number is : "<<b<<endl;
      		}
      		if(c>b && c>a){
      			cout<<"The maximum number is : "<<c<<endl;
      		}
      		else if(a==b || a==c){
      			cout<<"The maximum number is : "<<a<<endl;
      			break;	
      		}
      		else if(b==c){
      			cout<<"The maximum number is :  "<<b<<endl;
      		}
      	}
      	for(int i=1;i<=1;i++){
      		if(a<b && a<c){
      			cout<<"The minimum number is : "<<a<<endl;
      		}
      		if(b<a && b<c){
      			cout<<"The minimum number is : "<<b<<endl;
      		}
      		if(c<b && c<a){
      			cout<<"The minimum number is : "<<c<<endl;
      		}
      		else if(a==b || a==c){
      			cout<<"The minimum number is : "<<a<<endl;
      			break;
      		}
      		else if(b==c){
      			cout<<"The minimum number is : "<<b<<endl;
      		}
      	}
      }
      
      ```
      
      ```
      “老土”真行!!!
      
      • 1

      信息

      ID
      34
      时间
      1000ms
      内存
      256MiB
      难度
      2
      标签
      递交数
      88
      已通过
      52
      上传者