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

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

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


def calc(n, k):
    r = ""
    while n > 0:
        n, remainder = divmod(n, k)
        r += str(remainder)
    return r[::-1]


print(len(calc(n, k)))

Solution (Python):
import math
x, b = list(map(lambda n: int(n), input().split(" ")))
print(math.floor(math.log(x, b)) + 1)

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

Solution (Python):
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import product, combinations,permutations
from copy import deepcopy
import sys
sys.setrecursionlimit(4100000)



if __name__ == '__main__':
    N, K = map(int, input().split())
    cnt = 0
    while N!=0:
        N //= K
        cnt += 1
    print(cnt)

Solution (Python):
MM = input().split()
N = int(MM[0])
K = int(MM[1])
for i in range(1000000000000):
  if K**i > N:
    print(i)
    break

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

Solution (Python):
n, k = list(map(int, input().split()))
ans = ''
while n > 0:
    ans = str(n % k) + ans
    n //= k
print(len(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(' '))

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

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

for i in range(1,N+1):
    if N < K**i:
        ans = i
        break

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

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

Solution (Python):

def inputlist(): return [int(j) for j in input().split()]
def listinput(): return input().split()

def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)
N,K = inputlist()
print(len(base10to(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)
x2 = Base_10_to_n(N,K)
print(len(x2))

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

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

count=0
while 1:
    if N//(K**count)==0:
        break
    count +=1
print(count)

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

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 = map(int,input().split())
for i in range(N):
    if N >=K**i and N <K**(i+1):
        print(i+1)
        break

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

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

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

count=1
quo=n//k

while quo>0:
    quo=quo//k
    count+=1

print(count)

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

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

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

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

Solution (Python):


from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')


def solve(N: int, K: int):
    return int(math.log(N, K))+1


def main():

    sys.setrecursionlimit(10 ** 6)

    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))  
    print(f'{solve(N, K)}')


if __name__ == '__main__':
    main()

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

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

while a != 0:
  a = a//n
  ans += 1
  
print(ans)

Solution (Python):





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

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

print(ans)

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

Solution (Python):














































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    N, K = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    if K**0 <= N < K**1:
        result = 1
    elif K**1 <= N < K**2:
        result = 2
    elif K**2 <= N < K**3:
        result = 3

    result = 1
    n = N
    while True:
        if n < K:
            return [result]
        else:
            n = n / K
            result += 1



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['11 2']
        lines_export = [4]
    if pattern == 2:
        lines_input = ['1010101 10']
        lines_export = [7]
    if pattern == 3:
        lines_input = ['1314159265 3']
        lines_export = [18]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

Solution (Python):
def digits():
    
    N, K = map(int, input().split())
    
    count = 1
    while True:
        if N < K:
            return count
        else:
            N = N // K
            count += 1
            
result = digits()
print(result)

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

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

for i in range(1, 10**4):
    if n < k**i:
        print(i)
        exit()

Solution (Python):
import sys


def main():
    input = sys.stdin.buffer.readline
    n, k = map(int, input().split())
    i = 1
    while k ** i <= n:
        i += 1
    print(i)


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

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

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

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

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N, K = MI()

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

print(cnt)

Solution (Python):
n, k = map(int, input().split())
count = 1
while n >= k:
    n, _ = divmod(n, k)
    count += 1
print(count)

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

Solution (Python):

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

if not ( 1 <= N <= 10**9 and 2 <= K <= 10 ): sys.exit()

count = 0
a = N
while a >= K:
    a = a // 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):
from math import log, floor

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

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

Solution (Python):

import sys
import math
N,K = map(int,input().split())

if not ( 1 <= N <= 10**9 and 2 <= K <= 10 ): sys.exit()

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

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

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

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

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

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

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


keta = 1

while True:
    if n >= k:
        n = n//k
        keta += 1
    else:
        break

print(keta)

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

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, K = map(int, readline().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)

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

main()

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b =I()
for i in range(1,101):
    if b**i > a:
        print(i)
        sys.exit()

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

Solution (Python):

import collections as cl
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


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

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


main()

Solution (Python):
N,K=map(int,input().split())
ans=0
while True:
  if N-K**ans>=0:
    pass
  else:
    break
  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())
count = 0
while n > 0:
    n //= k
    count += 1 
print(count)

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

D = 1
while True:
    if N//K >0:
        D += 1
        N = N//K
    else:
        break

print(D)

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

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

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

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

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


def base(value, n):  
    result = ''
    tmp = int(value)
    while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
    result = str(tmp % n) + result
    return result


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

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

Solution (Python):

def main():
    N, K = map(int, input().split())
    ans = base10to(N, K)
    print(len(ans))

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math

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

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

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

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

print(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())
nbase = ''
tmp = n
while tmp > 0:
    nbase += str(tmp % k)
    tmp = int(tmp / k)

print(len(nbase))

Solution (Python):
import math

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

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

print(ans)

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

def change(N,shinsu):
    keta=0
    for i in range(10**9):
        if N<shinsu**i:
             keta+=i
             break
    ans=[0]*keta
    check=0
    for i in range(1,keta+1):
        j=N//(shinsu**(keta-i))
        ans[check]=j
        check+=1
        N-=(j)*(shinsu**(keta-i))
    return ans

print(len(change(N,K)))

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

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

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

Solution (Python):

if __name__ == '__main__':

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

	cnt = 1
	while True:
		if n % k == 0:
			n = n // k
		else:
			n = n - n % k
			n = n // k
		if n // k < k:
			if n // k == 0:
				if n % k == 0:
					pass
				else:
					cnt += 1
			else:
				cnt += 2
			break
		cnt += 1
			
	print(cnt)

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

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

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


for i in range(0,41):
    if n % k ** i != n:
        x += 1
    else:
        x = x
print(x)

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

i = 0
while True:
  if N >= K ** i:
    i += 1
  else:
    break

print(i)

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

ke = 1
while(True):
    if(n<k):
        print(ke)
        break
    else:
        n = n//k
        ke += 1

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

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

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

while n // k ** d >= 1:
  d += 1

print(d)

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

Sum = 0

while True:
    Sum += 1

    if K ** Sum > N:
        break

print(Sum)

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

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

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

ans = 0
while K**ans <=N:
    ans += 1

print(ans)

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

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

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

print(cnt)

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

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

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

def pn(x, n):
	if x // n: return pn(x // n, n) + str(x % n)
	return str(x % n)
n, k = map(int, input().split())
print(len(pn(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)

rslt = base_10_to_n(n, k)

print(len(rslt))

Solution (Python):
def main():
    N, K = map(int, input().split())
    ans = 0
    temp = 1
    while N > 0:
        ans = (N % K) * temp + ans
        N = N // K
        temp = temp * 10
    ans = str(ans)
    print(len(ans))
main()

Solution (Python):
n,k=map(int,input().split())
ans=""
while n>0:
  ans+=str(n%k)
  n//=k
print(len(ans[::-1]))

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    print(ans)
    return


if __name__ == '__main__':
    main()

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

Solution (Python):
n,k=map(int,input().split())
ans=0
for i in range(100000000):
    if n>=1:
        n=n/k
        ans+=1
    else:
        print(ans)
        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 = map(int, input().split())
x10 = n
x2 = Base_10_to_n(x10, k)
ans = str(x2)
print(len(ans))

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

l = []

while N > 0:
    l.insert(0, N % K)
    N = N // K

print(len(l))

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

print(ans)

Solution (Python):
N,K=map(int,input().split())
result=0
for i in range(10**9):
  if (N<K**i):
    result+=i
    break
print(result)

Solution (Python):
n,k = map(int,input().split())
for i in range(10**5):
    if n == 1:
        ans = 1
    elif k**(i-1) <= n < k**i:
        continue
    elif k**(i-1) > n:
        ans = i-1
        break
print(ans)

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


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

Solution (Python):
n, k = map(int, input().split())
if n < k:
    print(1)
    exit()
v = []
while True:
    x = n % k
    n //= k
    v.append(x)
    if n < k:
        v.append(n)
        break
print(len(v))

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 n in range(10**10):
    if N < K**n:
        print(n)
        exit()

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

Solution (Python):
n,k=map(int,input().split())
result=''
while n>=1:
    b=n%k
    result+=str(b)
    n//=k
print(len(result))

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

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

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

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

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

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

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

r=[]
i=0
a=0
while n>0:
  i=n%k
  n=n-i
  n=n//k
  r.append(i)
  a=a+1
  

print(a)

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())
l = []
while N // K != 0:
  l.insert(-1, N % K)
  N = N // K
l.append(N)
print(len(l))

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

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

Solution (Python):
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan,sqrt
import cmath as cma
import copy as cp
import sys
import re
import bisect as bs
sys.setrecursionlimit(10**7)
EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf
MOD = 10**9 + 7

def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def adj(n): return [[] for _ in range(n)]

class unionfind:
    def __init__(self, n):
        self.parent = [i for i in range(n)]
        self.size = [1 for i in range(n)]
    def find(self,a):
        if a == self.parent[a]: return a
        else: self.parent[a] = find(self,self.parent[a]); return self.parent[a]
    def unite(self,a,b):
        pa,pb = self.find(self,a), self.find(self,b)
        if pa == pb: return
        else: self.parent[pb] = pa; self.size[pa] += self.size[pb]
    def same(self,a,b): return find(self,a) == find(self,b)

n,k = imap()
for i in range(31):
    if k**i > n: ans = i; break
print(ans)

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

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

Solution (Python):
n, k = map(int, input().split())
q, count = n, 0
while(q >= k):
    r = q%k;      q = q//k
    count += 1
print(count+1)

Solution (Python):
import math
N, K = map(int, input().split())
if N <= K:
    N = str(N)
    print(len(N))
else:
    print(math.ceil(math.log(N, K)))

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

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

Solution (Python):
import numpy

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

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

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

Solution (Python):
n,k=map(int,input().split())
ans=1
while n//(k**ans):
  ans+=1
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 = map(int, input().split())
ans = 1
while n >= k:
    ans += 1
    n = n // k

print(ans)

Solution (Python):
import math

def main():
  N, K = map(int, input().split())
  i = 1
  tmp = 1
  
  while i > -1:
    if N >= K ** i:
      tmp += 1
    else:
      print(tmp)
      return
    
    i += 1
  
  
main()

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

count = 0

while N > 0:
  N //= 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)


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

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

from decimal import Decimal
from collections import defaultdict



sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, K = il()

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re


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

cnt = 1
while True:
    if cnt > 10000:
        break

    if N // K**cnt == 0:
        print(cnt)
        exit()
    cnt += 1

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

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

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

s = ""
while(True):
  if n < k :
    s += str(n)
    break
  else :
    s += str(n%k)
    n = n//k

print(len(s))

Solution (Python):
import sys

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

if N<K:
    print(1)
    sys.exit()

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

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

cnt = 0

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

print(cnt)

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

t = 0
for i in range(N):
    N = N//K
    t += 1
    if N == 0:
        print(t)
        exit()

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

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

Solution (Python):
from math import log, ceil

N, K = map(int, input().split())
res = ceil(log(N, K))
if res == 0:
    res = 1
print(res)

Solution (Python):
import sys

stdin = sys.stdin

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

n, k  = na()
ans = 1
i =1
while (k*i <= n):
  i *= 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 = list(map(int, input().split()))

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

print(res)

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

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Solution (Python):
n,k=map(int,input().split())
a,b=0,0
for i in range(1000000000):
  if n//k ==0:
    break
  else:
    n=n//k
    a+=1
print(a+1)

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