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())
c = 1
while True:
    if N < K ** c:
        print(c)
        exit()

    c += 1

Solution (Python):
N, K = [int(i) for i in input().split()]
cnt = 0
while(N > 0):
    N //= K
    cnt += 1
print(cnt)

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

now = 1
count = 0

while n >= now:
    count += 1
    now = now * k

print(count)

Solution (Python):
n, k = [int(x) for x  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):
from math import log,ceil
N,K = map(int,input().split())
n = ceil(log(N,K))
if N==1:
    print(1)
else:
    print(n)

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
  n, k = na()

  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)))

if __name__ == '__main__':
  main()

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

Solution (Python):
from math import log,floor
N,K = map(int,input().split())
print(floor(log(N,K)+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)


x2 = Base_10_to_n(N, K)
test = list(x2)
print(len(x2))

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

cnt = 0

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

print(cnt + 1)

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

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

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

Solution (Python):
def f(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())

a = f(n, k)
print(len(a))

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


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

    ans = Base_10_to_n(N, K)
    ans_list = list(str(ans))

    print(len(ans_list))


resolve()

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

def translate(n, k):
    tmp = n
    out = ""
    while tmp > 0:
        out = str(tmp % k) + out
        tmp = int(tmp / k)
    return out

print(len(translate(n, k)))

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

x = 1

while N != 0:
    N //= K
    x += 1

print(x-1)

Solution (Python):
N, K = [int(_) for _ in input().split()]
res = 0
while N > 0:
    N //= K
    res += 1
print(res)

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=list(map(int,input().split()))
x2=Base_10_to_n(n,k)
print(len(str(x2)))

Solution (Python):
a,b=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 = a
c = Base_10_to_n(a,b )
print( len(c) )

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,k = inpl()
cnt = 0
while True:
    if n >= k ** cnt:
        cnt += 1
    else:
        print(cnt)
        break

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(str(Base_10_to_n(N, K))))

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(Base_10_to_n(N, K)))

Solution (Python):
import math
n,k = [int(e) for e in input().split()]
ans = int(math.log(n,k))
print(ans+1)

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

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

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

numDigits = 1
while K ** numDigits <= N:
    numDigits += 1
print(numDigits)

Solution (Python):

import sys


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: int, K: int):
    print(len(str(Base_10_to_n(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):
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(list(str(base10to(n,k)))))

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

c = 0
i = 1
while True:
    if N <= K ** i - 1:
        break
    i += 1

print(i)

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

def main():
    n,k=map(int,input().split())
    cnt=0
    while n>0:
        m=n%k
        cnt+=1
        n=n//k
    print(cnt)

if __name__ == '__main__':
    main()

Solution (Python):
N,K = map(int,input().split())
A = []
while N>0:
    A.append(N%K)
    N = N//K
print(len(A))

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

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

ans = 0

while n > 0:
    n //= k
    ans += 1

print(ans)

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

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

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

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

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

Solution (Python):
a,b=map(int,input().split())
cnt=0
c=1
while c<=a:
  cnt+=1
  c*=b
print(cnt)

Solution (Python):


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


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


ans = len(str(conv(N, K)))

print(ans)

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

Solution (Python):

n,k = map(int,input().split())
ans = 1
count = 0
while True:
    ans *= k
    count += 1
    if n < ans:
        print(count)
        exit()

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

count = 0
while N >= K**count:
    count += 1
print(count)

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



N,K = LI()

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

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

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

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

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

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

count = 1

while K**count <= N:
    count += 1

print(count)

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

i = 1
while K ** i <= N:
    i += 1
else:
    print(i)

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

ans = 0

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

print(ans)

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

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


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

i = 1
while True:
    N = N // K
    if N == 0:
        break
    i += 1

print(i)

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

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

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

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

print(cnt)

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

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

Solution (Python):

import math

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

a = math.floor(math.log(N, K))+1

print(a)

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


def encode_x_base(n, x):
    ret = ''
    while n:
        ret += str(n % x)
        n //= x

    return ret[::-1]


print(len(encode_x_base(N, K)))

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

for i in range(10**5):
    if n<k**i:
        print(i)
        exit()

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

Solution (Python):
import math

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

l = math.log(n,k)

print(math.floor(l+1))

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

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):
import math

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

ans = math.log(N)//math.log(K)

print(int(ans+1))

Solution (Python):
N, K = [int(i) for i in input().split()]
for i in range(30, 0, -1):
    if(N//K**i >0):
        print(i+1)
        break
else:
    print(1)

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

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

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_N = Base_10_to_n(N, K)

print(len(list(str(ans_N))))

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


def convert(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(convert(N, K))))

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

print(ans)

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

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

ans=1
while n//k>0:
    n//=k
    ans+=1

print(ans)

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

ans = 0
tent = 1

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

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 = X_dumy//n
    return out


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

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

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

dig = 0
while True:
  if n >= pow(k,dig):
    dig += 1
  else:
    break
print(dig)

Solution (Python):
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N, K = read_int()

def solve():
    return rec(N)

def rec(n):
    if n < K:
        return 1
    return 1 + rec(n // K)

if __name__ == "__main__":
    print(solve())

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())
print( len(str(Base_10_to_n(N, K)) ))

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

ans = 0
while 1:
    ans += 1
    n //= k
    if n == 0:
        break
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())

result = 0
while N != 0:
    result += 1
    N //= K
print(result)

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

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

ans = 0
n = N
while n:
  n = n // K
  ans += 1
print(ans)

Solution (Python):
n,k = map(int, input().split())
x = 1
kari = k
while True:
    if n//kari >= 1:
        x += 1
        kari = k ** x
    else:
        print(x)
        quit()

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(x))

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

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

print(ans)

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(str(ans)))

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


def f(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(f(N, K))))

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

result = 1
while N:
    N //= K
    if 0<N:
        result += 1
    else:
        break

print(result)

Solution (Python):
n = list(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[0], n[1])
print(len(tmp))

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

c = 0
while a!=0:
    c+=1
    a=a//b
print(c)

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():
    from sys import stdin, setrecursionlimit
    
    
    
    
    
    
    
    
    
    
    
    

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


    

if __name__ == '__main__':
    main()

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

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

print(c+1)

Solution (Python):
N,K=list(map(int,input().split()))
out = ''
while N>0:
    out = str(N%K)+out
    N = int(N/K)
print(len(out))

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


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

print(i)

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

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

print(c)

Solution (Python):


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

def func(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(func(N,K))))

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


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


def main():
    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())
ans = 0
while N>=1:
  N/=K
  ans+=1
  
print(ans)

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

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

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

Solution (Python):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

N,K=input_int()

import math

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

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

print(cnt)

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def MI(): return map(int, input().split())


def S(): return input()


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



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


def main():
    N, K = MI()
    print(len(Base_10_to_n(N, K)))


if __name__ == '__main__':
    main()

Solution (Python):
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left 


sys.setrecursionlimit(10**7)
N, K = map(int, input().split())


for k in range(1, 1000):
    if N < K**(k):
        print(k)
        exit()

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

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

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)

if __name__=="__main__":
    n,k=map(int,input().split())
    ans=Base_10_to_n(n,k)
    print(len(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 resolve():
    N, K = map(int, input().split())
    print(len(Base_10_to_n(N, K)))
resolve()

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):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    N,K=map(int,input().split())
    ans=0
    a=1
    N+=1
    while N>a:
        a*=K
        ans+=1
    print(ans)

if __name__ == '__main__':
    main()

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)
ans = Base_10_to_n(n, k)
print(len(ans))

Solution (Python):

import sys
input = sys.stdin.readline

n, k = [int(item) for item in input().split()]

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

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

ans = 1
max_K = K

while N >= max_K:
    ans += 1
    max_K *= K

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()))

d = 1
k2 = k
while True:
    if n < k2:
        print(d)
        exit()
    else:
        d += 1
        k2 *= k

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

print(ans)

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

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(int(n),k)))
print(ans)

Solution (Python):
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

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

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

print(ans)

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

Solution (Python):
a,b=list(map(int, input().split()))
from math import log
if True:
  print(int(log(a,b)+1))

Solution (Python):
import string
numbers = "0123456789"
alphabets = string.ascii_letters 
characters = numbers + alphabets

def base_cvt(value, n=2):
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)
 
    if n < 2 or n > len(characters):
        raise ValueError('Invalid n:', value)
 
    result = ''
    tmp = int(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 main():
    n, k = map(int, input().split())

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7

n,k=map(int,input().split())
cnt=0
while n:
    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 = Base_10_to_n(N, K)
print(len(ans))

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

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

t=1
for tt in range(t):
    
    n,k= map(int, sys.stdin.readline().split(' '))
    v=1
    ans=1
    while(v<=n):
        v*=k
        ans+=1
    print(ans-1)
    
    
    

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

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

def sinsuu(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 = sinsuu(n,k)
print( len(ans) )

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

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

Solution (Python):










import math
import string

def intinput():
    return int(input())

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

def splitintinput():
    return map(int,input().split())

n, k = splitintinput()
for i in range(10000):
    if n < k ** i:
        print(i)
        break

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

res = 0
for _ in range(100):
    N = N // K
    res += 1
    if N == 0:
        break

print(res)

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

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

num = f(n,k)

print(len(str(num)))

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

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

print(keta)

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

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

Solution (Python):
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**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)


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

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

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


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

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())

ans = 1

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

print(ans)

Solution (Python):
import sys


def main(S):
    pass


if __name__ == '__main__':
    n, r = map(int, input().split())

    i = 0
    while (n > 0):
        i += 1
        n = n // r
    print(i)

Solution (Python):
n, k = map(int,input().split())
bi=''
while n!=0:
    bi+=str(n%abs(k))
    if k<0:n=-(-n//k)
    else:n=n//k
print(len(bi[::-1]))

Solution (Python):
n,k = map(int,input().split())
for i in range(1000000):
  if k**i > n:
    print(i)
    break

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

main()

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

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

def main():
  n,k=LI()
  ans=Base_10_to_n(n,k)
  return len(str(ans))


print(main())

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N, K = LI()
    cnt = 0
    while N:
        N = N//K
        cnt += 1
    print(cnt)
main()

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

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

i = 0
while True:
    if k**i > n:
        break
    i += 1

print(i)

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

    n, k = map(int, input().split())
    ans = []
    for i in range(30, -1, -1):
        t = n//k**i
        if len(ans) == 0 and t == 0:
            continue
        ans.append(t)
        n = n-k**i*t
    print(len(ans))


if __name__ == '__main__':
    main()

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

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

print(result)

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

Solution (Python):






def reVal(num): 

    if (num >= 0 and num <= 9): 
        return chr(num + ord('0')); 
    else: 
        return chr(num - 10 + ord('A')); 


def strev(str): 

    len = len(str); 
    for i in range(int(len / 2)): 
        temp = str[i]; 
        str[i] = str[len - i - 1]; 
        str[len - i - 1] = temp; 



def fromDeci(res, base, inputNum): 

    index = 0; 

    
    
    
    while (inputNum > 0): 
        res+= reVal(inputNum % base); 
        inputNum = int(inputNum / base); 

    
    res = res[::-1]; 

    return res; 


inputNum,base = map(int,input().split()) 
res = ""; 
print(len(str(fromDeci(res, base, inputNum))))

Solution (Python):
import math

n, k = map(int, input().split())
print(math.floor(math.log(n, k)+1))

Solution (Python):
import math

N, K = [int(i) for i in input().split()]

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

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

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

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

ans=0

while n>0:
    ans+=1
    n=n//k

print(ans)

Solution (Python):



'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

l = list(map(int, input().split()))

cnt =1
while l[0]>=l[1]:
    l[0]/=l[1]
    cnt +=1
print(cnt)

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

cnt = 0
while(N>0):
    N -= N%(K**cnt)
    cnt += 1


print(cnt-1)

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

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