习题3.2.5 分数约分
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
小X最近刚刚学习到了分数的知识,他苦恼于将分数化简,现在需要写一个程序来帮助他...
输入格式
第一行给定一个,表示要求个分数的约分。
接下来行,每行两个整数 a b (分别表示分子,分母。)
输出格式
两个整数 x y (分别表示值为a/b的最简分数的分子与分母)
样例数据
input
1
6 2
output
3 1
数据规模与约定
时间限制:
空间限制:
20201007pm基础代码测试
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2020-10-7 15:40
- End at
- 2020-10-7 15:52
- Duration
- 0.2 hour(s)
- Host
- Partic.
- 16