一个有趣的数学难题

2 puzzle math

虽然它与编程无关,但我认为可以提供一些帮助:

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,依此类推.

但我无法找到如何离开这里.

任何帮助/或更好的方法将不胜感激

Ant*_*nko 5

为什么评论中的所有答案都是?我希望我不会通过发布答案来打破某种我不知道的礼仪.

(b, d, f, h)必须是(2, 4, 6, 8)某种顺序的偶数,e必须是5,所以必须是某种顺序(a, c, g, i)的数字(1, 3, 7, 9).一旦你做了这些观察,只有4!*4!=576可能性,所以检查一下.

  • 我是唯一一个在他们看到一个阶乘时喊出这个数字的人吗?我希望不是. (2认同)