Toggle navigation
万里ACM
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem E: 计算A/B+C/D
Problem E: 计算A/B+C/D
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
86
Solved:
58
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
输入A、B、C、D四个整数(0≤A<10000,0<B<10000,0≤C<10000,0<D<10000)
计算,要求计算结果为最简分式(分子、分母均为非负整数)
Input
Sample Input
Copy
1 2 1 3 1 3 1 6 1 2 1 6 10 6 10 3
Sample Output
Copy
5 6 1 2 2 3 5 1