1 solutions
-
0
C :
#include<stdio.h> void main(){ int a,b,t; scanf("%d%d",&a,&b); if(a>b){ t = a; a = b; b = t; } printf("%d %d",a,b); }
C++ :
#include <iostream> using namespace std; int main(){ int a,b,t; cin>>a>>b; //如果a > b,交换ab if(a > b){ t = a; a = b; b = t; } cout<<a<<" "<<b<<endl; }
Python :
a,b = map(int,input().split() ) if a>b: print(b,a) elif b>a: print(a,b)
- 1
Information
- ID
- 10415
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By