P862
projecteuler.net

Larger Digit Permutation

ℹ️Published on Saturday, 4th November 2023, 04:00 pm; Solved by 803;
Difficulty rating: 10%

For a positive integer $n$ define $T(n)$ to be the number of strictly larger integers which can be formed by permuting the digits of $n$.

Leading zeros are not allowed and so for $n = 2302$ the total list of permutations would be:

$2023,2032,2203,2230,\mathbf{2302},2320,3022,32 02,3220$

giving $T(2302)=4$.

Further define $S(k)$ to be the sum of $T(n)$ for all $k$-digit numbers $n$. You are given $S(3) = 1701$.

Find $S(12)$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.