아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Unique Quotients

시간 제한1초메모리 제한1024 MB

요약
A부터 J까지 열 글자에 0에서 9까지의 서로 다른 숫자를 넣어 ABCDE / FGHIJ = 9가 되는 경우를 찾고, N번째 해를 출력한다.
난이도

보통10점 중 5점

유형
백트래킹, 수학, 완전 탐색
정답자
아직 제출이 없습니다

문제

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.

예제1

  1. 예제 1

    입력
    1
    
    예상 출력
    57429 06381