Swap when first is greater
Input
5, 3
Output
(3, 5)
Since 5 > 3, the returned tuple swaps the values.
Full lesson preview
Return the pair (a, b), swapping them if the first is greater than the second.
Problem statement
Task
Examples
Input
5, 3
Output
(3, 5)
Since 5 > 3, the returned tuple swaps the values.
Input format
Output format
Constraints
Samples
Input
2, 3
Output
(2, 3)
2 <= 3 so no swap.