Codeforces - 55D Beautiful numbers (数位dp+数论)

NoSuchKey