Larger Digit Permutation III
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 . You are given and .
Find . Give your answer modulo .
更大的数字重排(三)
令为通过重排的数字所能形成的比大的最小数,如果不存在这样的数则为。例如,,。
定义。已知,。
求,并对取余作为你的答案。
Gitalking ...