Swapping Two Numbers
Write a program which reads two integers x and y, and prints them in ascending order.
| Time Limit | $1$ 秒/Second(s) | Memory Limit | $512$ 兆字节/Megabyte(s) |
| 提交总数 | $1625$ | 正确数量 | $664$ | "
| 裁判形式 | 标准裁判/Standard Judge | 我的状态 | 尚未尝试 |
| 难度 | 分类标签 | STL |
Swapping Two Numbers
Write a program which reads two integers x and y, and prints them in ascending order.
The input consists of multiple datasets. Each dataset consists of two integers x and y separated by a single space.
The input ends with two 0 (when both x and y are zero). Your program should not process for these terminal symbols.
3 2
2 2
5 3
0 0
2 3
2 2
3 5
0 ≤ x, y ≤ 10000
the number of datasets ≤ 3000
| 本题记录 | 用 户(点击查看用户) | 运行号(点击购买题解) | 时 间 |
|---|---|---|---|
| 算法最快[$0 $ms] | 清泉流响 | 641311 | 2020-10-29 21:48:58 |
| 内存最少[$0 $KB] | 梦鸿 | 624290 | 2020-10-17 15:31:09 |
| 第一AC | 刘成健 | 312980 | 2018-11-14 10:45:31 |
| 第一挑战 | 却又像风捉摸不住 | 303351 | 2018-11-03 14:49:05 |
| 竞赛编号 | 竞赛名称 | 竞赛时间 | 访问比赛 |
|---|---|---|---|
| 1880 | 2025-2026-1学期《C语言程序设计》:循环结构I【25计算机】 | 2025-10-27 08:00:00 | 请登录 |
| 1838 | 2024-2025-1学期《C语言程序设计》:循环结构I【24计算机】 | 2024-10-24 00:00:00 | 请登录 |
| 1775 | 2023-2024-1学期《C语言程序设计》:循环结构I【23计算机】 | 2023-10-23 00:00:00 | 请登录 |
| 1718 | 2022-2023-1学期《C语言程序设计》:循环结构I【22计算机】 | 2022-10-24 08:00:00 | 请登录 |
| 1660 | 2021-2022-1学期《C语言程序设计》:循环结构I【21计算机】 | 2021-10-25 00:00:00 | 请登录 |