Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145298 梁敖铭 比较三个数大小II C++ Accepted 1 MS 268 KB 521 2026-01-25 14:41:03

Tests(1/1):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if (a>b && a>c&&b>c){ cout<<c<<" "<<b<<" "<<a; } if(b>a && b>c&&a>c){ cout<<c<<" "<<a<<" "<<b; } if(b>a && b>c&&a<c){ cout<<a<<" "<<c<<" "<<b; } if(a>b && a>c&&c>b){ cout<<b<<" "<<c<<" "<<a; }if(c>a && c>b&&b>a){ cout<<a<<" "<<b<<" "<<c; } if(c>a && c>b&&a<b){ cout<<b<<" "<<a<<" "<<c; } return 0; }