Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Prepared by Ibrahim Mesecan.
Sum of Ratios
Question:
Write a program (using Ratio class) that
calculates the sum of n ratios and shows the result.
Input specification
You will be given an integer (n) the number of ratios.
Then, in each of the following n lines you will be given
two integers: numerator, and denominator of ratio
where 1 ≤ n ≤ 100, 1 ≤ numerator ≤ 20
and 1 ≤ denominator ≤ 10.
Output specification
Show sum of the given ratios with two integers:
numerator and denominator.
Sample Input
3
4 8
2 3
3 4
|
Sample Output
23 12
|
Для отправки решений необходимо выполнить вход.
|