100519e专题

E - Equal Digits Gym - 100519E(数学)

For the given integer N and digit D, find the minimal integer K ≥ 2 such that the representation of N in the positional numeral system with base K contains the maximum possible consecutive number of d