시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 132 | 44 | 38 | 37.255% |
Many advanced calculators have a fraction feature that will simplify fractions for you.
You are to write a program that will accept for input a non-negative integer as a numerator and a positive integer as a denominator, and output the fraction in simplest form. That is, the fraction cannot be reduced any further, and the numerator will be less than the denominator. You can assume that all input numerators and denominators will produce valid fractions.
28 7
4
13 5
2 3/5
0 7
0
55 10
5 1/2