import kotlin.math.ln
import kotlin.math.pow

fun main() {
    runTest(12, 1)
    runTest(12, 2)
    runTest(123, 45)
    runTest(123, 12345)
    runTest(123, 678910)
}

private fun runTest(l: Int, n: Int) {