ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Арифметика > задача:


50530 - Sum of Ratios

Гость
• Вопросы к жюри (2)

Задачи раздела

• 50304 - Number Pattern
• 50305 - John's Tasks
• 50649 - Puzzle
• 50321 - Missing Number
• 50308 - IT Knowledge Seminars
• 50310 - Kinetic Energy
• 50314 - Falling Distance
• 50316 - Population Bar Chart
• 50530 - Sum of Ratios
• 50384 - Permutations revisited
• 50368 - Right-most non zero digit in N!
• 50293 - Sum of odd numbers from ...
• 50365 - Sum of the numbers from a...
• 50388 - Number of Armstrong Num...
• 50363 - Class GPA Average
• 50390 - Total Salary Paid
• 50392 - How much space

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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

Для отправки решений необходимо выполнить вход.

www.contester.ru