、それは非常に関連するプログラミングではありませんが、私はSOいくつかの助けになると思うが:なしと仮定して、私は思考を始め興味深い数学パズル
A zeroless pandigital number of base 10 is a number with all the distinct digits 1,2,3,4,5,6,7,8,9. For example, the first zeroless pandigital number of base 10 is 123456789. Find a zeroless pandigital number of base 10 such that the numbers up to the nth digit is divisible by n i.e. the number formed by 1st, 2nd and 3rd digit is divisible by 3, the number formed by 1 to 6 digits is divisible by 6 and so on.
。 「abcdefghi」であり、aが「1〜9」の間の任意の数であってもよいことを示すと bは偶数であることができ、eは確かに5である。
しかし、私はここから行く方法を見つけることができません。
すべてのヘルプ/またはより良い方法は
「すべての別個の数字」とは、数字が1回だけ表示されることを意味しますか、またはすべての数字が少なくとも1回存在する限り、数字を繰り返すことができますか? – Epcylon
これはProject Eulerの問題を指定してください。 –
b、d、f、h - はすべて偶数でなければなりません。 eは5でなければなりません。 – tvanfosson