Larger Digit Permutation II
Let be the smallest number larger than that can be formed by rearranging digits of , or if no such number exists. For example, and .
Define and for .
Let . You are given .
Find . Give your answer modulo .
更大的数字重排(二)
令为通过重排的数字所能形成的比大的最小数,如果不存在这样的数则为。例如,,。
定义,且对于有。
令。已知。
求,并对取余作为你的答案。
Be the first person to leave a comment!