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):
import sys
def input(): return sys.stdin.readline().strip()

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

Solution (Python):
N,K=[int(x) for x in input().rstrip().split()]
cnt=0
ans=0
while(True):
  if N!=0:
    N=N//K
    cnt+=1
  else:
    break
    
print(cnt)

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

count = 0

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

print(count)

Solution (Python):
n,k=map(int,input().split())
cnt = 0
while n>=k:
  n = n // k
  cnt += 1
print(cnt+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 = []
while n > 0:
    ans.append(n%k) 
    n //= k

print(len(ans))

Solution (Python):
import sys

n, k = map(int, input().split())
if n <= k:
    print(len(str(n)))
    sys.exit()

def clas(n, k):
    li = []
    while True:
        c = n // k
        li.append(c % k)
        if c < k:
            li.append(c)
            break
        n = c
    return li

print(len(clas(n, k)))

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

cnt = 1

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    n, k = map(int,input().split())
    y = 0
    while n:
        n //= k
        y += 1
    print(y)


if __name__ == '__main__':
    solve()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    n, k = map(int,input().split())
    x = 1
    y = 0
    while n:
        n //= k
        y += 1
    print(y)


if __name__ == '__main__':
    solve()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    n, k = map(int,input().split())
    x = 1
    y = 0
    if n == 1:
        print(1)
        exit()
    while x <= n:
        x *= k
        y += 1
    print(y)


if __name__ == '__main__':
    solve()

Solution (Python):
import math

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

x = math.log(n, k)
x = math.floor(x)

print(x+1)

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

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

print(count)

Solution (Python):

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

i = 1
while N >= K ** i:
    if N >= K ** i:
        i += 1

print(i)

Solution (Python):
il = input().split()
N = int(il[0])
K = int(il[1])
T = N


result = ""

i = 0
k = 0
while (T != 0):
    result = str(T%K)+result
    T = T//K

print (len(result))

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
print(len(Base_10_to_n(n, r)))

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

i = 1
j = 1
answer = 1
while i > 0:
  if N % (K ** j) != N:
    answer += 1
    j += 1
  else:
    print(answer)
    break

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

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

tmp = B
ans = 1
while True:
  if tmp - 1 >= N:
    break
  tmp *= B
  ans += 1
  
print(ans)

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

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

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

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

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,input().split())
count = 1
while n // k != 0:
    count += 1
    n //= k
print(count)

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

ans = 1
i = k
s = 1

while(n%i != n):
    s += 1
    i  = k ** s
    ans += 1

print(ans)

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

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))


def main():
    N,K = MI()
    i = 0
    ans = 0

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





if __name__ == "__main__":
	main()

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

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

Solution (Python):
import sys

n,k = map(int,input().split())
if n == 1:
	print(1)
	sys.exit()
i = 0
num = 1
while True:
	if n < num:
		break
	num *= k
	i += 1

print(i)

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

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

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

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

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

Solution (Python):
import math
def I():
  return input()
def II():
  return int(input())
def MII():
  return map(int, input().split())
def LMII():
  return list(map(int, input().split()))

n, r = MII()
i = 1
a = r
while True:
  if n < a:
    break
  else:
    a *= r
    i += 1
print(i)

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

while True:
    n //= k
    ans += 1
    if n == 0: break

print(ans)

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

a = 1
for i in range(n):
  if n<k:
    break
  else:
    a+=1
    n= n//k

print(a)

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

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

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

Solution (Python):
x = input()
n = int(x.split()[0])
k = int(x.split()[1])
result = ''

while n > 0:
    result = str(n % k) + result
    n //= k

print(len(result))

Solution (Python):
N,K=map(int,input().split())
a=0
i=1
while pow(K,i)<=N:
  a+=1
  i+=1
print(a+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())
p = 0
while True:
    if N < K**p:
        break
    p += 1
print(p)

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

if K == 10:
    Str = str(N)
    print(len(Str))
else:
    cnt = []
    while True:
        if N < K:
            cnt.append(N)
            break
        cnt.append(N%K)
        N = int(N/K)
    print(len(cnt))

Solution (Python):
import math

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

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

Solution (Python):
import sys;input=lambda:sys.stdin.readline().rstrip();aint=lambda:int(input());ints=lambda:list(map(int,input().split()))
import math;floor,ceil=math.floor,math.ceil
from collections import deque
Yes=lambda b:print('Yes')if b else print('No');YES=lambda b:print('YES')if b else print('NO')
is_even=lambda x:True if x%2==0 else False

def main():
  n,k = ints()
  print(1+int(math.log(n,k)))

      
if __name__ == '__main__':
  main()

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

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

print(res)

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

print(count)

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

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

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

d = 0
while True:
    if N < K**d:
        break
    d += 1

print(d)

Solution (Python):
n, k = map(int, input().split())
ans = 0
while (n != 0):
    ans += 1
    n = 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):
n,k=map(int,input().split())
for i in range(1,31):
    if n<k**i:
        print(i)
        break

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

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

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

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

Solution (Python):
n, k = map(int,input().split())
know = 1
for i in range(10**9):
    if (n+0.5)//know == 0:
        print(max(1,i))
        break
    else:
        know *= k

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

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

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

s=str()
while n>0:
  n=n//k
  s+='1'
print(len(s))

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

s=str()
while n>0:
  n=n//k
  s+='1'
print(len(s))

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

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

Solution (Python):


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

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

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

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

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

Solution (Python):
def base10toq(n,q):
  if int(n/q): return base10toq(int(n/q),q)+str(n%q)
  return str(n%q)

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

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

Solution (Python):
N,K = (int(x) for x in input().split())
count = 0
i = 0
while N > 0:
    count += 1
    N -= K**i*(K-1)
    i += 1
print(count)

Solution (Python):

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

i = 0 

a = K

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

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

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

print(p)

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

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

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

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

count=1
while True:
    N/=K
    if not N>=1:
        break
    count+=1
print(count)

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

ans = x = 1
for i in range(1, 10000):
    x = x * k  
    if x > n:
        ans = i
        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):
N,K = [int(x) for x in input().split()]
for i in range(10000):
    if N < K**i:
        print(i)
        break

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

Solution (Python):
def main():
  N,K=map(int,input().split())
  sFlag=True
  s=0
  while(sFlag):
    sk=K**s
    if(N>=sk):
      sans=s
      s=s+1
    else:
      print(sans+1)
      sFlag=False

if __name__ == '__main__':
	main()

Solution (Python):
x = input().split()
n = int(x[0])
k = int(x[1])
counter = 0
rem = 0

while n >= 1:
  rem = n % k
  n = n / k
  counter += 1
  rem = 0
print(counter)

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

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())
i=0
while k**i<=n:
  i+=1
print(i)

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

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

Solution (Python):
a,b=map(int,input().split())
c=0
if a>b:
    while a//b>=b:  
        a=a//b
        c+=1
    print(c+2)
else:
    print(len(str(a)))

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

while N // K != 0:
    ans.append(N % K)    
    N = int(N // K)
ans.append(N)

print(len(ans))

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

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

count = 1

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

print(count)

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

count = 1

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

print(count)

Solution (Python):

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

digits = 1

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

print(digits)

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

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

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

Solution (Python):
a,b=(map(int,input().split()))
c=1
for i in range(10000000):
    if a<b:
        break
    a=a/b
    c=c+1
print(c)

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

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

print(i)

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

Solution (Python):

import math


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


def convert(x,y):
    if int(x/y):
        return convert(int(x/y),y) + str(x%y)
    return str(x%y)


text = len(convert(n,k))


print(text)

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

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

Solution (Python):
x = 0
a,b = list(map(int,input().split()))
while(a/b!=0):
    a = a//b
    x+=1
print(x)

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

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

print(num)

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

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

print(c+1)

Solution (Python):
num,psin=map(int,input().split())
sisuu=0
while True:
  if num<psin**sisuu:
    break
  sisuu+=1
print(sisuu)

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

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

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

print(len(nsin(X,n)))

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

count=0
while n//k!=0:
    n=n//k
    count+=1
    
print(count+1)

Solution (Python):
def f(d, k):
    q = d // k
    r = d % k
    if q == 0:
        return str(r)
    else:
        return f(q, k) + str(r)

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

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

Solution (Python):
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])


def main():
    """エントリーポイント"""
    N, K = input(int, int)
    n = N
    ans = 0
    while 0 < n:
        n //= K
        ans += 1
    print(ans)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Solution (Python):
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])


def main():
    """エントリーポイント"""
    N, K = input(int, int)
    n = N
    ans = 0
    while 1 < n:
        n //= K
        ans += 1
    print(ans + (n == 1))


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

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

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

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

Solution (Python):

url = "https://atcoder.jp//contests/abc156/tasks/abc156_b"


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


if __name__ == '__main__':
    main()

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

Solution (Python):
import numpy as np

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

k = 1
a = 1
while True:
    a *= r
    if n >= a:
        k += 1
    else:
        print(k)
        break

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

Solution (Python):
import numpy as np

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

ans = int(np.log(n) // np.log(k)) + 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())
count = 0
while N > 0:
    N = N//K
    count += 1
print(count)

Solution (Python):
N, K = map(int, input().split())
count = 0
if K == 10:
    print(len(str(N)))
elif 2<=K<=9:
    for i in range(1,5**8):
        N = N//K
        count += 1
        if N == 0:
            break
    print(count)

Solution (Python):
import sys
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N, K = rl()

num = []
while N > 0:
	num.append(N % K)
	N = N // K
print(len(num))

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

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

print(ans+1)

Solution (Python):
N,K = map(int,input().split())
temp = N
count = 0
for i in range(1,10**9):
    temp = int(temp/K)

    if temp == 0:
        count = i
        break
print(count)

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

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

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

isFlg = False
i=1
while True:
    tmp = k **i

    if n < tmp:
        isFlg = True


    if isFlg:
        break

    i+=1


print(i)

Solution (Python):
x,y = map(int,input().split())
ans = 1
for i in range(10**10):
    if y**(i+1) > x:
        ans = i+1
        break
print(ans)

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

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

print(shinsu)

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

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

print(shinsu)

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

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

m = 0

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

print(m)

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

Solution (Python):
class atcoder:
    N,K=map(int,input().split())
    i=0
    while(1):
        if N<K:
            break
        i+=1
        N=N//K
    print(i+1)

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

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

Solution (Python):
def main():
    N, K  = map(int, input().split())
    if K == 10:
        print(len(str(N)))
    else:
        mod = list()
        count = 0
        for i in range(10**9):
            a, b = divmod(N, K)
            N = a
            count += 1
            if N == 0:
                break
        print(count)
main()

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

ans=0

for i in range(N):
    if N<K:
        ans=1
        break
    elif K**i>N:
        ans=i
        break
print(ans)

Solution (Python):
n,k=map(int,input().split())
rank=0
quo=n
rest=0
while True:
  quo = quo//k
  rest = quo%k
  rank += 1
  if quo==0 and rest==0:
    break
print(rank)

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

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

Solution (Python):


def main():
    N, K = map(int, open(0).read().split())
    cnt = 1
    while N >= K:
        N = N // K
        cnt += 1
    print(cnt)
    


main()

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

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

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

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

Solution (Python):
N,K=(int(x) for x in input().split())
b=1
a=1
if N==1:
    print(1)
else:
     while a<=N:
          b=b+1
          a=K**b
     else:
          print(b)

Solution (Python):
n,k = map(int, input().split())
for i in range(1,100):
    if (n < k**i):
        print(i)
        exit()

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

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

Q = 1
if N <= K:
  count = len(str(N))
else:
  Q = N//K
  count = 1
  while Q != 0:
    Q = Q//K
    count = count + 1
print(count)

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

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

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

    print(ans)
main()

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

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

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

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

print(count)

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,k=int(N),int(K)

for i in range(0,1000000):
    
    if k**i==n:
        print(i+1)
        break
    if k**i>n:
        print (i)
        break
    else:
        continue

Solution (Python):
n, m = list(map(int, input().split(' ')))



def conversion(_n, _m):
    if int(_n / _m):
        return conversion(int(_n / _m), _m) + str(_n % _m)
    return str(_n % _m)


digit = (conversion(n, m))
print(len(digit))

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

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

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

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

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)


print(len(base_10_to_n(n, k)))

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

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

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict

con = 10 ** 9 + 7

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


def main():
	N, K = getlist()
	ans = 1
	while True:
		N = int(N // K)
		if N == 0:
			break
		ans += 1
	print(ans)

if __name__ == '__main__':
	main()

Solution (Python):
INT_MAX=10**18+7
x=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
GETA=123

import math as M
n,k=INPUT()
print(M.floor(M.log(n,k))+1)

Solution (Python):
N, K = tuple(int(n) for n in input().split())

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

print(count)

Solution (Python):
import sys
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  N, K = map(int, readline().split())
  if N<K:
    ans = 1
  else:
    ans = math.ceil(math.log(N,K))
  print(ans)
  
  
  
if __name__ == '__main__':
  main()

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

n = int(n)
k = int(k)

count = 0
while True:
    if n == 0:
        break
    else:
        n = n//k
        count += 1

print(count)

Solution (Python):
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''
n , k = map(int,input().split())
cnt = 1
while n>=k:
	n=n//k
	cnt = cnt + 1
print(cnt)

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

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())
result = int(math.log(N, K)) + 1
print(str(result))

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

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

while n >= k:
    ans.append(n%k)
    n = n//k
ans.append(n)

print(len(ans))

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

r=[]
while True:
    n=int(n/d)
    i= n%d
    r.append(i)
    if n==0:
        break
print(len(r))

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

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

Solution (Python):
import numpy as np


def solve():
    ans = len(str(np.base_repr(n, k)))
    return ans


n, k = [int(i) for i in input().split(" ")]
print(solve())

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

n = int(n)
k = int(k)

count = 0
while True:
    if n == 0:
        break
    else:
        n = n//k
        count += 1

print(count)

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

Solution (Python):
n, k = (int(x) for x in input().split())
i = 1
while n/(k**i) >= 1:
  i += 1
  
print(i)

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

Solution (Python):

N, K = map(int,input().split())
judge = 1
i = 1

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

Solution (Python):
n,k=map(int,input().split())
cnt=1
ans=0
if k>n:
 print(1)
else:
 for i in range(1000):
  if cnt>n:
   print(ans)
   exit()
  ans+=1
  cnt*=k

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

Solution (Python):
N,K = map(int, input().split())
i = 1
while i > 0:
    if N - pow(K, i) < 0:
        print(i)
        break
    else:
        i += 1

Solution (Python):
a,b=map(int,input().split())
count = 1
for i in range(1,100):
    if a/(b ** i)>=1:
        count += 1
    else:
        break
print(count)

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

count = 0
while 1:
    N = N//K
    if N != 0:
        count += 1
    else:
        count += 1
        break

print(count)

Solution (Python):
import math
def f(n, k):
    a = math.log(n, k)
    print(math.floor(a)+1)

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

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

for i in range(100):
  if k**(i-1) <= n <k**i:
    a.append(i)
    break
    
print(a[0])

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

print(cnt)

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

while n >= k:
  n = n//k
  count += 1
  
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 = ""
while n != 0:
    n, r = divmod(n, k)
    ans = str(r) + ans
print(len(ans))