Company: Trilogy_4july
Difficulty: medium
Sum of Two Fractions Problem Description Each line of input holds a single expression of the form X/Y+U/V , which means the sum of the fraction X/Y and the fraction U/V . For every expression, add the two fractions and write the result as a single fraction A/B in lowest terms, meaning A and B share no common divisor greater than 1. For example: 2/6+2/6 equals 4/6 , which in lowest terms is 2/3 . 7/10+13/10 equals 20/10 , which in lowest terms is 2/1 . You are given several such expressions. Produce the reduced result for each of them, in the order the expressions were given. Input Format (inferred - the source presents this task through a function signature solution(fractions) ; the line-based layout below is the equivalent text form used by this judge.) The first line contains a single integer n , the number of expressions. Each of the next n lines contains one expression, written as X/Y+U/V with no spaces and no leading zeros. Output Format Print n lines. The i-th line is the reduced