Unique Quotients
시간 제한1초메모리 제한1024 MB
A부터 J까지 열 글자에 0에서 9까지의 서로 다른 숫자를 넣어 ABCDE / FGHIJ = 9가 되는 경우를 찾고, N번째 해를 출력한다.
문제
The letters A..J each represent a different single digit from the set [0..9]. Find all solutions to the quotient of two five digit numbers:
ABCDE / FGHIJ = 9
Note: leading zeros are allowed, i.e., F could be 0.
입력
A single integer N that specifies which solution of the set to print.
출력
Print the two integers that represent ABCDE and FGHIJ with a space between them on a line. Print only the Nth solution from the set of solutions ordered numerically smallest ABCDE first.