시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 256 MB 912 687 636 77.941%

문제

당신은 학생들의 기초수학 학습을 돕는 소프트웨어를 개발하는 팀의 개발자이다. 당신은 가분수를 대분수(?)로 출력하는 부분을 개발해야 한다. 진분수는 분자가 분모보다 작은 분수이다; 대분수는 정수부를 따로 떼어주고 남는 부분을 진분수로 쓰는 기법이다. 예제로, 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+XHViMmY5XHVjMmUwXHVjNzQwIFx1ZDU1OVx1YzBkZFx1YjRlNFx1Yzc1OCBcdWFlMzBcdWNkMDhcdWMyMThcdWQ1NTkgXHVkNTU5XHVjMmI1XHVjNzQ0IFx1YjNkNVx1YjI5NCBcdWMxOGNcdWQ1MDRcdWQyYjhcdWM2ZThcdWM1YjRcdWI5N2MgXHVhYzFjXHViYzFjXHVkNTU4XHViMjk0IFx1ZDMwMFx1Yzc1OCBcdWFjMWNcdWJjMWNcdWM3OTBcdWM3NzRcdWIyZTQuIFx1YjJmOVx1YzJlMFx1Yzc0MCBcdWFjMDBcdWJkODRcdWMyMThcdWI5N2MgXHViMzAwXHViZDg0XHVjMjE4KD8pXHViODVjI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5cclxuIiwib3V0cHV0IjoiPHA+Rm9yIGVhY2ggdGVzdCBjYXNlLCBkaXNwbGF5IHRoZSByZXN1bHRpbmcgbWl4ZWQgZnJhY3Rpb24gYXMgYSB3aG9sZSBudW1iZXIgZm9sbG93ZWQgYnkgYSBwcm9wZXIgZnJhY3Rpb24sIHVzaW5nIHdoaXRlc3BhY2UgdG8gc2VwYXJhdGUgdGhlIG91dHB1dCB0b2tlbnMuPFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

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

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