• 沒有找到結果。

Sample Input 61 62 0 Sample Output There are no solutions for 61

N/A
N/A
Protected

Academic year: 2021

Share "Sample Input 61 62 0 Sample Output There are no solutions for 61"

Copied!
1
0
0

加載中.... (立即查看全文)

全文

(1)

725 Division

Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits 0 through 9 once each, such that the first number divided by the second is equal to an integer N , where 2≤ N ≤ 79. That is,

abcde f ghij = N

where each letter represents a different digit. The first digit of one of the numerals is allowed to be zero.

Input

Each line of the input file consists of a valid integer N . An input of zero is to terminate the program.

Output

Your program have to display ALL qualifying pairs of numerals, sorted by increasing numerator (and, of course, denominator).

Your output should be in the following general form:

xxxxx / xxxxx = N xxxxx / xxxxx = N .

.

In case there are no pairs of numerals satisfying the condition, you must write ‘There are no solutions for N .’. Separate the output for two different values of N by a blank line.

Sample Input 61

62 0

Sample Output

There are no solutions for 61.

79546 / 01283 = 62 94736 / 01528 = 62

參考文獻

相關文件

Lee [2006] uses a difficulty level based on a weighted sum of the techniques required to solve a puzzle, showing from a sample of 10,000 Sudoku puzzles that there is a

Then, it is easy to see that there are 9 problems for which the iterative numbers of the algorithm using ψ α,θ,p in the case of θ = 1 and p = 3 are less than the one of the

Because both sets R m  and L h i ði ¼ 1; 2; :::; JÞÞ are second-order regular, similar to [19, Theorem 3.86], we state in the following theorem that there is no gap between

The point should then be made that such a survey is inadequate to make general statements about the school (or even young people in Hong Kong) as the sample is not large enough

• A function is a piece of program code that accepts input arguments from the caller, and then returns output arguments to the caller.. • In MATLAB, the syntax of functions is

„ A socket is a file descriptor that lets an application read/write data from/to the network. „ Once configured the

Show that the requirement in the definition of uniform continuity can be rephrased as follows, in terms of diameters of sets: To every  > 0 there exists a δ > 0 such that

It is interesting that almost every numbers share a same value in terms of the geometric mean of the coefficients of the continued fraction expansion, and that K 0 itself is