z-easy
You are given two rational numbers in the form a/b, where (1 <= a,b <= 1000000000). You have to find the sum of the two rational numbers and output the result in the reduced form. A rational number a/b is in the reduced form if a and b do not have any common integer dividers - we can not divide both a and b with the same integer greater than 1
InputThe first of the standard input contains the two rational numbers a/b and [
]/d, separated by a single space.OutputOn the standard ouput you should print out the sum of the two rational numbers, in its reduced form.
Input:
[c]1/2 1/6
Output:
[c]1/2 1/6
Output:
2/3Input:
Output:
1/4 1/6Output:
5/12Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.