시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 256 MB 1036 784 721 78.455%

문제

당신은 학생들의 기초수학 학습을 돕는 소프트웨어를 개발하는 팀의 개발자이다. 당신은 가분수를 대분수(?)로 출력하는 부분을 개발해야 한다. 진분수는 분자가 분모보다 작은 분수이다; 대분수는 정수부를 따로 떼어주고 남는 부분을 진분수로 쓰는 기법이다. 예제로, 27/12는 대분수로 2 3/12이다. 기약분수로 만들지 말아야 한다.(3/12를 1/4로 바꿔 출력하지 마시오.)

입력

한 줄에 걸쳐 한 테스트 케이스가 입력된다. 각각의 테스트 케이스는 [1, 2^31 - 1]범위의 두 정수가 입력된다. 첫 번째 정수는 분자고 두 번째는 분모이다. "0 0" 입력이 들어오는 라인에서 입력을 종료한다.

출력

각 테스트 케이스에 대해 한 줄에 걸쳐 주어진 입력에 맞는 대분수를 공백토큰으로 구분하여 출력하라.

예제 입력 1

27 12
2460000 98400
3 4000
0 0

예제 출력 1

2 3 / 12
25 0 / 98400
0 3 / 4000
W3sicHJvYmxlbV9pZCI6IjEwNDc0IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHViZDg0XHVjMjE4XHVjODhiXHVjNTQ0XHVkNTc0PyIsImRlc2NyaXB0aW9uIjoiPHA+XHViMmY5XHVjMmUwXHVjNzQwIFx1ZDU1OVx1YzBkZFx1YjRlNFx1Yzc1OCBcdWFlMzBcdWNkMDhcdWMyMThcdWQ1NTkgXHVkNTU5XHVjMmI1XHVjNzQ0IFx1YjNkNVx1YjI5NCBcdWMxOGNcdWQ1MDRcdWQyYjhcdWM2ZThcdWM1YjRcdWI5N2MgXHVhYzFjXHViYzFjXHVkNTU4XHViMjk0IFx1ZDMwMFx1Yzc1OCBcdWFjMWNcdWJjMWNcdWM3OTBcdWM3NzRcdWIyZTQuIFx1YjJmOVx1YzJlMFx1Yzc0MCBcdWFjMDBcdWJkODRcdWMyMThcdWI5N2MgXHViMzAwXHViZDg0XHVjMjE4KD8pXHViOD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xyXG4iLCJvdXRwdXQiOiI8cD5Gb3IgZWFjaCB0ZXN0IGNhc2UsIGRpc3BsYXkgdGhlIHJlc3VsdGluZyBtaXhlZCBmcmFjdGlvbiBhcyBhIHdob2xlIG51bWJlciBmb2xsb3dlZCBieSBhIHByb3BlciBmcmFjdGlvbiwgdXNpbmcgd2hpdGVzcGFjZSB0byBzZXBhcmF0ZSB0aGUgb3V0cHV0IHRva2Vucy48XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

ACM-ICPC > Regionals > North America > North America Qualification Contest > ACM-ICPC North America Qualifier 2014 F번

  • 문제를 번역한 사람: tae
  • 잘못된 번역을 찾은 사람: veydpz