只有80分,第四检测过不去,求助!
查看原帖
只有80分,第四检测过不去,求助!
1007518
wangjingyu1楼主2023/6/3 08:48

代码如下:

#include<iostream>
using namespace std;
int main(){
    int a,b,c;
    int d1,d,ed,sd;
    cin>>a>>b>>c;
    d1=a>b ?a:b;
    d=d1>c ?d1:c;
    d1=c<b ?c:b;
    sd=d1<a ?d1:a;
    if (a!=d and a!=sd){
        cout<<sd<<" "<<a<<" "<<d;
        return 0;
    }
    if (b!=d and b!=sd){
        cout<<sd<<" "<<b<<" "<<d;
        return 0;
        
    }
    if (c!=d and c!=sd){
        cout<<sd<<" "<<c<<" "<<d;
        return 0;
    }
    return 0;
}
2023/6/3 08:48
加载中...