시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB132443837.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.

예제 입력 1

28
7

예제 출력 1

4

예제 입력 2

13
5

예제 출력 2

2 3/5

예제 입력 3

0
7

예제 출력 3

0

예제 입력 4

55
10

예제 출력 4

5 1/2