311336: CF1971A. My First Sorting Problem

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:6 Solved:0

Description

A. My First Sorting Problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are given two integers $x$ and $y$.

Output two integers: the minimum of $x$ and $y$, followed by the maximum of $x$ and $y$.

Input

The first line contains a single integer $t$ ($1 \leq t \leq 100$) — the number of test cases.

The only line of each test case contains two space-separated integers $x$ and $y$ ($0 \leq x, y \leq 9$).

Output

For each test case, output two integers: the minimum of $x$ and $y$, followed by the maximum of $x$ and $y$.

ExampleInput
10
1 9
8 4
1 4
3 4
2 0
2 4
6 9
3 3
0 0
9 9
Output
1 9
4 8
1 4
3 4
0 2
2 4
6 9
3 3
0 0
9 9

Output

题目大意:
这是一个排序问题。给定两个整数 x 和 y,输出两个整数:x 和 y 的最小值,以及 x 和 y 的最大值。

输入数据格式:
输入的第一行包含一个整数 t(1 ≤ t ≤ 100)——测试用例的数量。
每个测试用例只有一行,包含两个由空格分隔的整数 x 和 y(0 ≤ x, y ≤ 9)。

输出数据格式:
对于每个测试用例,输出两个整数:x 和 y 的最小值,后面跟着 x 和 y 的最大值。

示例:
输入:
```
10
1 9
8 4
1 4
3 4
2 0
2 4
6 9
3 3
0 0
9 9
```
输出:
```
1 9
4 8
1 4
3 4
0 2
2 4
6 9
3 3
0 0
9 9
```

请注意,上述输入和输出是直接从网页内容中复制并翻译的,没有使用 LaTeX 格式。在 LaTeX 中,公式通常使用美元符号 `$` 包围,例如 `$x$` 和 `$y$`。题目大意: 这是一个排序问题。给定两个整数 x 和 y,输出两个整数:x 和 y 的最小值,以及 x 和 y 的最大值。 输入数据格式: 输入的第一行包含一个整数 t(1 ≤ t ≤ 100)——测试用例的数量。 每个测试用例只有一行,包含两个由空格分隔的整数 x 和 y(0 ≤ x, y ≤ 9)。 输出数据格式: 对于每个测试用例,输出两个整数:x 和 y 的最小值,后面跟着 x 和 y 的最大值。 示例: 输入: ``` 10 1 9 8 4 1 4 3 4 2 0 2 4 6 9 3 3 0 0 9 9 ``` 输出: ``` 1 9 4 8 1 4 3 4 0 2 2 4 6 9 3 3 0 0 9 9 ``` 请注意,上述输入和输出是直接从网页内容中复制并翻译的,没有使用 LaTeX 格式。在 LaTeX 中,公式通常使用美元符号 `$` 包围,例如 `$x$` 和 `$y$`。

加入题单

算法标签: