925. Larger Digit Permutation III

Let B(n) be the smallest number larger than n that can be formed by rearranging digits of n, or 0 if no such number exists. For example, B(245)=254 and B(542)=0.

Define T(N)=n=1NB(n2). You are given T(10)=270 and T(100)=335316.

Find T(1016). Give your answer modulo 109+7.

925. 更大的数位排列数 3

B(n) 为:通过重排 n 的数位,可以得到的最小的 >n 的数。如果这样的数不存在,则置 B(n)=0。例如,B(245)=254B(542)=0

T(N)=n=1NB(n2),已知 T(10)=270T(100)=335316

T(1016)(109+7) 的值。


这个链接 回到源站。

这个链接 回到详细版题目目录。