Problem:
 Score : 200 points    Problem Statement Given is an integer N . Find the number of digits that N has in base K .      Notes For information on base- K representation, see Positional notation - Wikipedia .      Constraints  All values in input are integers.  1 \leq N \leq 10^9  2 \leq K \leq 10         Input Input is given from Standard Input in the following format:  N  K       Output Print the number of digits that N has in base K .        Sample Input 1 11 2      Sample Output 1 4  In binary, 11 is represented as 1011 .       Sample Input 2 1010101 10      Sample Output 2 7       Sample Input 3 314159265 3      Sample Output 3 18

Solution (Python):
n, k = map(int, input().split())
i = 0
while n >= k ** i:
    i += 1
print(i)

Solution (Python):
n,k=map(int,input().split())

for i in range(40):
    if k**i<= n <k**(i+1):
        print(i+1)
        break
    else:
      pass

Solution (Python):
n, k = map(int, input().split())

ans = 1
while n//k>0:
	n //= k
	ans+=1
print(ans)

Solution (Python):




import sys
input = sys.stdin.readline



def main():
    N,K = map(int,input().split())

    res = 1

    while True:
        temp1 = K ** res
        temp2 = K ** (res-1)
        if (N >= temp2) & (N < temp1):
            break
        res += 1

    print(res)



main()

Solution (Python):
n, k= map(int, input().split())

import math 

def findNumberOfDigits(n, base): 
       
    dig = (math.floor(math.log(n) /
                 math.log(base)) + 1) 
      
    print(dig)
  
  

findNumberOfDigits(n, k)

Solution (Python):
import numpy as np

n,k = map(int,input().split())

print(len(str(np.base_repr(n,k))))

Solution (Python):
n,k=map(int, input().split())
i=0
while k**i <= n:
    i+=1
print(i)

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

def solve():
    N, M = map(int, input().split())
    n = Base_10_to_n(N, M)
    return len(n)

print(solve())

Solution (Python):
N, K = map(int, input().split())

exp = 1
while True:
    if N < K ** exp:
        print(exp)
        exit()
    exp += 1

Solution (Python):
n,k=map(int,input().split())
a=0
while n>=k:
  n=n//k
  a=a+1
print(a+1)

Solution (Python):
n, k = map(int, input().split())

i = 0
while n >= k ** i:
    i += 1
print(i)

Solution (Python):
N, K = map(int, input().split())
ans = 0
while N >= K:
    N /= K
    ans += 1
print(ans + 1)

Solution (Python):

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

 



n, k = map(int, input().split())
n = Base_10_to_n(n, k)
print(len(n))

Solution (Python):


def main():
    n, k = map(int, input().split())
    ans = 1

    
    while(n >= k):
        
        n = int(n / k)
        ans += 1
    
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
N, K = map(int, input().split())
count = 1
i = int(N / K)
while i >= 1:
  i /= K
  count += 1
print(count)

Solution (Python):
a = list(map(int,input().split()))

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

print(len(Base_10_to_n(a[0], a[1])))

Solution (Python):
def A():
    N, R = map(int, input().split())
    if N >= 10:
        print(R)
    else:
        print(R + 100*(10-N))

def B():
    N, K = map(int, input().split())
    n = N
    ans = 1
    while n >= K:
        q, r = divmod(n, K)
        ans += 1
        n = q
    print(ans)
B()

Solution (Python):
N,K = map(int,input().split())

c = 1
while(1):
    if N // K >=1:
        c += 1
        N = N//K
        
    else:
        break
print(c)

Solution (Python):
import string
numbers = "0123456789"
alphabets = string.ascii_letters
characters = numbers + alphabets
def base_cvt(value, n=2):
    result = ''
    tmp = value
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result

N,K=map(int,input().split())
print(len(str(base_cvt(N,K))))

Solution (Python):
N, K = map(int, input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
tmp = Base_10_to_n(N, K)
tmp = str(tmp)
print(len(tmp))

Solution (Python):
n,k = map(int, input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

ans = Base_10_to_n(n,k)
print(len(ans))

Solution (Python):



def main():
  n, k = map(int, input().strip().split())
  count = 0
  while n:
    n //=k
    count += 1
  print(count)

if __name__=='__main__':
  main()

Solution (Python):
def conv(X, n):
    if (int(X/n)):
        return conv(int(X/n), n)+str(X%n)
    return str(X%n)

n, k = [int(_) for _ in input().split()]
print(len(conv(n, k)))

Solution (Python):
N,K = map(int,input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

print(len(Base_10_to_n(N,K)))

Solution (Python):
n,k=map(int,input().split())
ans=0
while k**ans<=n:
    ans += 1
print(ans)

Solution (Python):
n, k = map(int, input().split())
c = 0
tmp = 1
while(n >= tmp):
    tmp*=k
    c+=1
print(c)

Solution (Python):
n,k=map(int,input().split())
answer=0
for i in range(100):
    if n/k**(i+1)<1:
        break
    else:
        answer+=1
print(answer+1)

Solution (Python):
n, k = map(int, input().split())

cnt = 0
while n >= k:
    n //= k
    cnt += 1
print(cnt+1)

Solution (Python):
a = input().split()
b = int(a[0])
c = int(a[1])

def Base_10_to_n(X, n):
	if (int(X/n)):
		return Base_10_to_n(int(X/n), n)+str(X%n)
	return str(X%n)

print(len(Base_10_to_n(b, c)))

Solution (Python):
x,k = map(int,input().split())

import math
print(1+int(math.log(x,k)))

Solution (Python):
N,R=map(int,input().split())
for i in range(1000000000):
	if R**i>N:
		print(i)
		break

Solution (Python):
def func(x,n):
    if int(x/n):
        return func(int(x/n),n)+str(x%n)
    return str(x%n)    

N,K=map(int,input().split())
print(len(func(N,K)))

Solution (Python):
N,K=map(int,input().split())
p=1
while N>=K:
  N=N//K
  p+=1
print(p)

Solution (Python):
n,m=map(int,input().split())
ans=0
c=1
while c<=n:
  c*=m;ans+=1
print(ans)

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

def main():
    import sys
    input = sys.stdin.readline
    N,K = map(int,input().split())
    print(len(Base_10_to_n(N, K)))


if __name__ == "__main__":
    main()

Solution (Python):
n,k=map(int,input().split())
a_li=[]
while n>0:
    a=n%k
    a_li.append(a)
    n=n//k
print(len(a_li))

Solution (Python):
n, k = input().split()


def base_10_to_n(X, n):
    if int(X / n):
        return base_10_to_n(int(X / n), n) + str(X % n)
    return str(X % n)


x = base_10_to_n(int(n), int(k))
print(len(x))

Solution (Python):
N, K = map(int, input().split())


def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
print(len(str(Base_10_to_n(N, K))))

Solution (Python):
N, K = map(int, input().split())

i = 0
while 1:
    if K ** (i+1) > N >= K ** i:
        break
    i += 1

print(i+1)

Solution (Python):
N,K=map(int,input().split())
d=1
ans=0
while(N>=d):
    d=d*K
    ans+=1
print(ans)

Solution (Python):
N, K = map(int, input().split())
cnt = 0

while N > 0:
    N //= K
    cnt += 1

print(cnt)

Solution (Python):

N, K = map(int, input().split())


def base_10_to_n(X, n):
    if (int(X / n)):
        return base_10_to_n(int(X / n), n) + str(X % n)
    return str(X % n)

ans = len(str(base_10_to_n(N, K)))
print(ans)

Solution (Python):
import math

words = lambda t : list(map(t, input().split()))
n,k = words(int)
if n == 1:
    print(1)
else:
    print(math.ceil(math.log(n,k)))

Solution (Python):
n,k=map(int,input().split())
L=[]
while n>0:
   l=n%k
   L.append(l)
   n//=k
print(len(L))

Solution (Python):



def solve(*args: str) -> str:
    n, k = map(int, args[0].split())

    ret = 1
    while 1 <= n/(k**ret):
        ret += 1
    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):
n,r = map(int,input().split())

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

ans = Base_10_to_n(n, r)

print(len(str(ans)))

Solution (Python):


N, K = map(int, input().split())

i = 0
while True:
    if K ** i <= N < K ** (i+1):
        print(i+1)
        break
    i += 1

Solution (Python):
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)

def main():
    N,K=map(int,input().split())
    x=base10to(N,K)
    print(len(x))
if __name__=="__main__":
    main()

Solution (Python):
n,k=map(int,input().split())
l=1
while n>k-1:
  n=n//k
  l+=1
print(l)

Solution (Python):
N, K = map(int, input().split())

tmp = 1
ans = 0
while (tmp <= N):
    tmp *= K
    ans += 1
print(ans)

Solution (Python):
N,K=map(int,input().split(' '))
for i in range(100):
    if K**(i-1)<=N<K**(i):
        print(i)
        exit()

Solution (Python):
n,k=map(int,input().split())
c=1
while(n//k!=0):
  c+=1
  n//=k
print(c)

Solution (Python):
N,K = map(int,input().split())
s=0
for i in range(1000):
    if K**i<=N<=K**(i+1):
        s=i+1

print(s)

Solution (Python):
N,K = map(int,input().split())
count = 1
for __ in range(100):
    if int(N//K) > 0:
        count += 1
        N = N//K
print(count)

Solution (Python):
N,K = map(int,input().split())
i = 1
count =1
while True:
    i = K*i
    if N < i:
        break
    count +=1
print(count)

Solution (Python):
N, K = list(map(int, input().split()))

t = 1
x = K
while K ** t <= N:
    x = x * t
    t += 1

print(t)

Solution (Python):

def main():
    n, k = map(int, input().split())
    ans = 0
    while n > 0:
        n //= k
        ans += 1
        if n == k:
            ans += 2
            break

    print(ans)

main()

Solution (Python):
N,K=map(int,input().split())
cnt = 1
while N>=K:
  cnt+=1
  N=N//K
print(cnt)

Solution (Python):
n, k = map(int, input().split())

def a(x, n):
    tmp = x
    out = ''
    while tmp >0:
        out = str(tmp%n)+out
        tmp //= n
    return out

print(len(str(a(n, k))))

Solution (Python):
import string
characters = "0123456789"
def base_cvt(value, n=2):
    result = ''
    tmp = value
    while tmp >= n:
        idx = tmp % n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp % n
    result = characters[idx] + result
    return result
def resolve():
    n,k = map(int,input().split())
    print(len(base_cvt(n,k)))
resolve()

Solution (Python):
N,K=map(int,input().split())
a = 1
while N >= K:
    N = N/K
    a = a+1
    
print(a)

Solution (Python):
n, k = map(int, input().split())
for i in range(1, 10**9+7):
    if n < k**i:
        break
print(i)

Solution (Python):
N, K = map(lambda x: int(x), input().split(" "))

result = 0
minus_num = K-1
while N > 0:
    N -= minus_num
    minus_num *= K
    result += 1

print(result)

Solution (Python):
import sys

n,k=(int(i) for i in input().split())

keta=0
while n/k!=0:
    keta+=1
    n=n//k

print(keta)

Solution (Python):
N,K=map(int, raw_input().split())

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

print len(str(Base_10_to_n(N,K)))

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, K):
    for i in range(10000000000):
        if K ** i > N:
            return i


def main():
    N, K = read_int_n()
    print(slv(N, K))


if __name__ == '__main__':
    main()

Solution (Python):
N,K = map(int,input().split())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

X = Base_10_to_n(N, K)
X_ = str(X)
print(len(X_))

Solution (Python):
import sys


N, K = map(int, sys.stdin.readline().split())

for i in range(0,10000):
    temp = pow(K, i)
    if  temp > N:
        print(i)
        break

Solution (Python):
N,K=map(int,input().split())
k=1
count=0
while(N>=k):
  k=k*K
  count+=1
  
print(count)

Solution (Python):
import sys
import heapq
import copy
import numpy as np
from collections import deque

n,k=list(map(int,input().split()))

print(int(np.floor(np.log(n)/np.log(k)))+1)

Solution (Python):
[n,k]=list(map(int,input().split()))
i=0
while True:
    if k**i<=n<k**(i+1):
        break
    else:
        i+=1
ans=i+1
print(ans)

Solution (Python):
N, K = [int(x) for x in input().split()]
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
ans = Base_10_to_n(N, K)
print(len(ans))

Solution (Python):
N,K=map(int,input().split())

p=1
dig=0
for i in range(1000):
    p*=K
    dig+=1
    if p>N:
        break

print(dig)

Solution (Python):
n,k = map(int,input().split())

for i in range(31):
    if k**i-1 >= n:
        print(i)
        exit()

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

N, K = map(int, input().split())
print(len(str(Base_10_to_n(N, K))))

Solution (Python):
N, K = map(int,input().split())

d = 0
while 1:
    N //= K
    d += 1
    if N == 0:
        break

print(str(d))

Solution (Python):
n, k = map(int, input().split())
cnt = 0
while n >= 1:
    n = n/k
    cnt += 1
print(cnt)

Solution (Python):
def Main(N, K):
    counter = 0
    while(N):
        N //= K
        counter += 1
    return counter
    

def main():
    N, K = list(map(int, input().split()))
    print(Main(N, K))

if __name__ == '__main__':
    main()

Solution (Python):
if __name__ == "__main__":
    tmp = [int(i) for i in input().split(" ")]
    N = tmp[0]
    K = tmp[1]
    i = 1
    while True:
        if N < K**i:
            break
        i+=1
    print(i)

Solution (Python):
n,k=map(int,input().split())
a=0
while n:
  n//=k
  a+=1
print(a)

Solution (Python):
import math
[N,K] = map(int,input().split())
keta = math.log(N,K) //1 +1
print(int(keta))

Solution (Python):
n, k = map(int, input().split())
ans = 0 
while True:
  if n < k:
    break
  n /= k 
  ans += 1
  
print(ans+1)

Solution (Python):
def conv(x, n):
    if x < 0: return None
    if n < 2 or 16 < n: return None

    if x == 0: return 0

    nchar = '0123456789ABCDEF'
    digit = 0

    result = ''

    while x > 0:
        result = nchar[x % n] + result
        x = x // n

    return result

n,k=map(int,input().split())
ans=conv(n,k)
print(len(ans))

Solution (Python):
import math
N, K = map(int, input().split())
print(math.floor(math.log(N, K))+1)

Solution (Python):
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out


x10, N = map(int,input().split())
x2 = Base_10_to_n(x10, N)
print( len(x2) )

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians

from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)


def main():
    N, K = MAP()

    print(len(Base_10_to_n(N, K)))


if __name__ == '__main__':
    main()

Solution (Python):
n, k = map(int, input().split())


def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n % b)
    return str(n % b)


a = base10to(n, k)
print(len(str(a)))

Solution (Python):
N, K = map(int,input().split())
d = 0
while K**d <= N:
    d += 1
print(d)

Solution (Python):
n, k = map(int, input().split())

i = 1
while True:
    if k ** i > n:
        print(i)
        exit()
    else:
        i += 1

Solution (Python):
N, K = map(int, input().split())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
print(len(list(Base_10_to_n(N, K))))

Solution (Python):
import math
N, K = [int(x) for x in input().split(' ')]
print(int(math.log(N, K) // 1) + 1)

Solution (Python):
n,b=map(int,input().split());
count=0;
while(n!=0):
    count+=1;
    n=int(n/b);
print(count)

Solution (Python):
N,K= map(int, input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

print(len(Base_10_to_n(N,K)))

Solution (Python):
d = input().split(" ")
n = int(d[0])
k = int(d[1])
a = 0
while n != 0:
	n = n // k
	a += 1
print(a)

Solution (Python):
n,k = map(int,input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
  
x10 = n
x2 = Base_10_to_n(x10, k)
print(len(x2))

Solution (Python):
N, K = map(int, input().split())

n = N
digit = 0

while n:
    n = n // K
    digit += 1

print(digit)

Solution (Python):
n,k = map(int,input().split())
tempk = k
ans = 1
while 1:
    if tempk<=n:
        ans+=1
        tempk*=k
        
    else:
        break



print(ans)

Solution (Python):
n,r=[int(i) for i in input().split()]
ans=0
while n>0:
    n=n//r
    ans+=1
print(ans)

Solution (Python):
from math import log, ceil
N, K = map(int, input().split())

num = log(N, K)
if int(num) == 0:
    print(1)
else:
    print(ceil(num))

Solution (Python):
N,K = map(int,input().split())
ans = 1
k = K
while N >= k:
  k = k * K
  ans += 1
print(ans)

Solution (Python):
n,k = [int(x) for x in input().split()]

ans = 0
while n >= k:
    n = n//k
    ans +=1
print(ans+1)

Solution (Python):
n, k = map(int, input().split())
ans = 1
d = k
while n >= d:
    ans += 1
    d *= k
print(ans)

Solution (Python):
import math

def main():
    N,K = map(int, input().split())
    res = math.log(N)/math.log(K)
    res = math.floor(res)+1
    print(int(res))

if __name__ == "__main__":
    main()

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)


def main():
    N,K = map(int, readline().split())

    n = Base_10_to_n(N, K)
    print(len(n))

if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]

def count(N, K):
    num = 0
    while N >= K:
        N = N // K
        num += 1
    return num + 1

print(count(N, K))

Solution (Python):

import sys


def solve(N: int, K: int):
    print(len(Base_10_to_n(N, K)))
    return


def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    solve(N, K)

if __name__ == '__main__':
    main()

Solution (Python):

n,k=map(int,input().split())



ans=0
while True:
    ans+=1
    shou=n//k
    amari=n%k
    if shou==0:
        break
    n=shou
print(ans)

Solution (Python):
import math

N, K = map(int, input().split())
print(math.floor(math.log(N, K)) + 1)

Solution (Python):
N, R = map(int, input().split())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

 
x2 = Base_10_to_n(N, R)
print(len(x2))

Solution (Python):
N = [int(str) for str in input().split()]
n = N[0]
k = N[1]

import math

print(int(math.log(n,k))+1)

Solution (Python):
n,k = list(map(int,input().split()))
count = 1

while True:
    if n < k ** count:
        break
    else:
        count += 1

print(count)

Solution (Python):
n, k = map(int, input().split())
i = 0
while True:
  if n < k**i:
    break
  else:
    i += 1
print(i)

Solution (Python):
import math
n,k = map(int,input().split())
if n != 1:
    print(math.ceil(math.log(n,k)))
else:
    print(1)

Solution (Python):
N, K = list(map(int, input().split()))

for i in range(100000):
    if N // (K**i) == 0:
        print(i)
        break

Solution (Python):
N, K = map(int, input().split())


def Digit(X, n):
    X_dumy = X
    out = ''
    while X_dumy > 0:
        out = str(X_dumy % n) + out
        X_dumy = int(X_dumy / n)
    return out


leng = str(Digit(N, K))
print(len(leng))

Solution (Python):
N, K = map(int, input().split())

ans = 1
while N >= K:
    N = N // K
    ans += 1

print(ans)

Solution (Python):
from math import log
N, K = map(int, input().split())
print(int(log(N, K)) + 1)

Solution (Python):
n, k = map(int, input().split())

count = 0

while n // k >= 1:
  n = n // k
  count += 1

print(count + 1)

Solution (Python):
from math import log
print(int(log(*map(int, input().split()))) + 1)

Solution (Python):
N,K=map(int,input().split())
for i in range(1,101):
  if N//(K**(i))<1:
    print(i)
    exit()

Solution (Python):
N, K = map(int,input().split())
total = 1
while N >= K:
  N = N//K
  total += 1
print(total)

Solution (Python):
def base_changer(number,base):
    buff=97+abs(base-10)
    dic={};buff2='';buff3=10
    for i in range(97,buff+1):
        dic[buff3]=chr(i)
        buff3+=1   
    while(number>=base):
        mod=int(number%base)
        number=int(number//base)
        if (mod) in dic.keys():
            buff2+=dic[mod]
            continue
        buff2+=str(mod)
    if (number) in dic.keys():
        buff2+=dic[number]
    else:
        buff2+=str(number)

    return buff2[::-1]  
N,K = map(int, input().split())
print(len(base_changer(N,K)))

Solution (Python):
n,k=map(int,input().split())
c=0
while n>=1:
  n/=k
  c+=1
print(c)

Solution (Python):
n,k=map(int,input().split())
ans=1
t=k
while n>=t:
    ans+=1
    t=k**ans
print(ans)

Solution (Python):
n, k = map(int, input().split())
ans = 0

def Base_10_to_n(X, n):
    if (int(X / n)):
        return Base_10_to_n(int(X / n), n) + str(X % n)
    return str(X % n)

print(len(str(Base_10_to_n(n, k))))

Solution (Python):
numbers = "0123456789"

N, K= map(int, input().split())

tmp = N
res = ''
while tmp >= K:
  idx = tmp%K
  res = numbers[idx] + res
  tmp = int(tmp / K)
idx = tmp%K
res = numbers[idx] + res
print(len(res))

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N, K = read_ints()

ans = ''
a = N
while a >= K:
    a, b = divmod(a, K)
    ans += str(b)

print(len(ans[::-1]) + 1)

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

n,k = map(int, input().split())

print(len(str(Base_10_to_n(n,k))))

Solution (Python):
N, K = map(int, input().split())

n = 1
for i in range(100):
    if N < n:
        print(i)
        break
    n *= K

Solution (Python):
n,k = map(int,input().split())
i = 1
while (True):
  if (n < k**i):
    print(i)
    break
  else:
    i += 1

Solution (Python):
n,k = map(int,input().split())
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)
print(len(base10to(n,k)))

Solution (Python):
n,k=map(int,input().split())
ans=1

while n >= k**ans:
    ans += 1

print(ans)

Solution (Python):
def numberToBase(n, b):
    if n == 0:
        return [0]
    digits = []
    while n:
        digits.append(int(n % b))
        n //= b
    return digits[::-1]

n, b = input().split()
result = len(numberToBase(int(n), int(b)))
print(result)

Solution (Python):
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

N,K=map(int,input().split())
x10 = N
x2 = Base_10_to_n(x10, K)
print(len(x2))

Solution (Python):
N, K = map(int, input().split())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
x2 = Base_10_to_n(N, K)
print(len(x2))

Solution (Python):
n, k = [int(i) for i in input().split()]
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
print(len(Base_10_to_n(n, k)))

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
 
 
N,K=map(int,input().split())

x = Base_10_to_n(N, K)

print(len(str(x)))

Solution (Python):
n, k = map(int, input().split())

for i in range(100):
    if k ** i <= n:
        continue
    else:
        break

print(i)

Solution (Python):
n,k = map(int,input().split())
i = 0
while True:
    if k ** i > n:
        break
    i += 1
print(i)

Solution (Python):
N,K=map(int,input().split())
def B(X, n):
    if (int(X/n)):
        return B(int(X/n), n)+str(X%n)
    return str(X%n)
print(len(B(N,K)))

Solution (Python):
N, K = input().split()
N = int(N)
K = int(K)

def koike(X, n):
    if (int(X/n)):
        return koike(int(X/n), n)+str(X%n)
    return str(X%n)
x = N
new_x = koike(x, K)
print(len(new_x))

Solution (Python):
N,K =map(int,input().split())
ans = 0
while True :
    if N < K :
        break
    else:
        N = N // K
        ans += 1
print(ans+1)

Solution (Python):
n, k = map(int, input().split())

for i in range(100):
    if k ** i > n:
        print(i)
        break

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

N, K = list(map(int, input().split()))
print(len(Base_10_to_n(N, K)))

Solution (Python):
import sys
input = sys.stdin.readline


n, k = map(int, input().split())
cnt, ans = 1, 0

while cnt <= n:
    cnt *= k
    ans += 1
print(ans)

Solution (Python):
n,k=map(int,input().split())
s=0
i=0
while n!=0:
    n=n//k
    i+=1
print(i)

Solution (Python):
import numpy as np
N,K = map(int,input().split())
print(len(np.base_repr(N,K)))

Solution (Python):
import sys

N,K = map(int,input().split())

for i in range (1,1000):
  if K ** i > N:
    print(i)
    sys.exit()

Solution (Python):
N, K = map(int, input().split())

i = 0
while True:
    if N < K**i:
        print(i)
        exit()
    i += 1

Solution (Python):
N,K=map(int,input().split())
cnt=1

while N >= K**cnt:
  cnt += 1
  
print(int(cnt))

Solution (Python):
import math
N,K=map(int,input().split())
print(math.ceil(math.log(N,K))+1) if math.log(N,K).is_integer() else print(math.ceil(math.log(N,K)))

Solution (Python):
import math

arr=input().split(" ")
n,k=int(arr[0]),int(arr[1])

print(int(math.log(n,k))+1)

Solution (Python):
import math
n,k=map(int,input().split())
ans =(math.floor(math.log(n)/math.log(k)) + 1)
print(ans)

Solution (Python):
n,k = map(int,input().split())
ans = 1
c = k
while n >= c:
    c *= k
    ans += 1
print(ans)

Solution (Python):
n, k = list(map(int, input().split(" ")))


count = 1
num = k
while True:
    if n < num:
        break
    num = num * k
    count += 1
print(count)

Solution (Python):
n,k=map(int, input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

print(len(Base_10_to_n(n,k)))

Solution (Python):
N,K = [int(x) for x in input().split()]

a = 0
while N > 0:
    N = N//K
    a = a + 1
print(a)

Solution (Python):
def main():
    N, K = (int(i) for i in input().split())

    ans = [K**i for i in range(30)]
    from bisect import bisect
    print(bisect(ans, N))


if __name__ == '__main__':
    main()

Solution (Python):
import math
a,b=map(int,input().split())
c=math.log(a,b)
if c//1==c:
    print(int(math.log(a,b))+1)
    exit()
print(math.ceil(math.log(a,b)))

Solution (Python):
N,K = map(int,input().split())

digit = 1
while N >= K**digit:
    digit += 1

print(digit)

Solution (Python):
n, k = map(int, input().split())

hoge = 1

for i in range(32):
  if hoge > n:
    print(i)
    exit()
  else:
    hoge *= k

Solution (Python):
N, K = map(int, input().split())
ans = 0
now = 1
while now <= N:
    now *= K
    ans += 1

print(ans)

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

n, k = map(int, input().split())
print(len(Base_10_to_n(n,k)))

Solution (Python):
N, K = map(int, input().split())

cnt = 1

while N // K > 0:
    N //= K
    cnt += 1

print(cnt)

Solution (Python):

import sys

import string
digs = string.digits + string.ascii_letters


def conv(num,b):
    convStr = "0123456789"
    if num<b:
        return convStr[num]
    else:
        return conv(num//b,b) + convStr[num%b]


def solve(N: int, K: int):
    print(len(conv(N,K)))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    solve(N, K)

if __name__ == '__main__':
    main()

Solution (Python):
import math

N, K = map(int, input().split())

print(int(math.log(N, K)) + 1)

Solution (Python):
import math

N, K = map(int, input().split())

ans = int(math.log(N, K)) + 1
print(ans)

Solution (Python):
N, K = input().split()
N = int(N)
K = int(K)

import math
print(int(math.log(N, K)) + 1)

Solution (Python):
n,k= map(int,input().split())
i = 0
while k ** i > n or k ** (i+1) <=n:
    i = i+1
print(i+1)