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

ct = 1

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

Solution (Python):
n, k = map(int, input().split())
ans = 0
while True:
    a = n // k
    b = n % k
    
    ans += 1
    if a == 0:
        break
    n = a
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 = int(X_dumy/n)
    return out
a,n=map(int,input().split())
print(len(str(Base_10_to_n(a, n))))

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

Solution (Python):
"""
Author    : co_devil Chirag Garg
Institute : JIIT
"""
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *



from fractions import Fraction
mod = int(pow(10, 9)+7)


def ii(): return int(input())


def si(): return str(input())


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


def li(): return list(mi())


def fii(): return int(stdin.readline())


def fsi(): return str(stdin.readline())


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


def fli(): return list(fmi())


abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12,
       'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24,
       'z': 25}


def getKey(item): return item[0]


def sort2(l): return sorted(l, key=getKey)


def d2(n, m, num): return [[num for x in range(m)] for y in range(n)]


def isPowerOfTwo(x): return (x and (not (x & (x - 1))))


def decimalToBinary(n): return bin(n).replace("0b", "")


def ntl(n): return [int(i) for i in str(n)]


def powerMod(x, y, p):
    res = 1
    x %= p
    while y > 0:
        if y & 1:
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res


graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000


def bfs(d, v):
    q = []
    q.append(v)
    visited[v] = 1
    while len(q) != 0:
        x = q[0]
        q.pop(0)
        for i in d[x]:
            if visited[i] != 1:
                visited[i] = 1
                q.append(i)
        print(x)


def make_graph(e):
    d = {}
    for i in range(e):
        x, y = mi()
        if x not in d:
            d[x] = [y]
        else:
            d[x].append(y)
        if y not in d:
            d[y] = [x]
        else:
            d[y].append(x)
    return d


def gr2(n):
    d = defaultdict(list)
    for i in range(n):
        x, y = mi()
        d[x].append(y)
    return d


def connected_components(graph):
    seen = set()

    def dfs(v):
        vs = set([v])
        component = []
        while vs:
            v = vs.pop()
            seen.add(v)
            vs |= set(graph[v]) - seen
            component.append(v)
        return component

    ans = []
    for v in graph:
        if v not in seen:
            d = dfs(v)
            ans.append(d)
    return ans


def primeFactors(n):
    s = set()
    while n % 2 == 0:
        s.add(2)
        n = n // 2
    for i in range(3, int(sqrt(n)) + 1, 2):
        while n % i == 0:
            s.add(i)
            n = n // i
    if n > 2:
        s.add(n)
    return s


def find_all(a_str, sub):
    start = 0
    while True:
        start = a_str.find(sub, start)
        if start == -1:
            return
        yield start
        start += len(sub)


def SieveOfEratosthenes(n, isPrime):
    isPrime[0] = isPrime[1] = False
    for i in range(2, n):
        isPrime[i] = True
    p = 2
    while (p * p <= n):
        if (isPrime[p] == True):
            i = p * p
            while (i <= n):
                isPrime[i] = False
                i += p
        p += 1
    return isPrime


def dijkstra(edges, f, t):
    g = defaultdict(list)
    for l, r, c in edges:
        g[l].append((c, r))

    q, seen, mins = [(0, f, ())], set(), {f: 0}
    while q:
        (cost, v1, path) = heappop(q)
        if v1 not in seen:
            seen.add(v1)
            path = (v1, path)
            if v1 == t:
                return (cost, path)

            for c, v2 in g.get(v1, ()):
                if v2 in seen:
                    continue
                prev = mins.get(v2, None)
                next = cost + c
                if prev is None or next < prev:
                    mins[v2] = next
                    heappush(q, (next, v2, path))
    return float("inf")


def binsearch(a, l, r, x):
    while l <= r:
        mid = l + (r-1)//2
        if a[mid]:
            return mid
        elif a[mid] > x:
            l = mid-1
        else:
            r = mid+1
    return -1


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


n, k = mi()
res = ""
s = str(fromDeci(res, k, n))
print(len(s))

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)

li = list(map(int, input().split()))
ans = len(base_10_to_n(li[0], li[1]))
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 = int(X_dumy/n)
    return out

kazu, sinsuu = map(int, input().split())
print(len(Base_10_to_n(kazu, sinsuu)))

Solution (Python):


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

while digit <= N:
    digit *= K
    cnt += 1

print(cnt)

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

cnt = 0

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

print(cnt)

Solution (Python):
n, k = map(int,input().split())
out = ""
n_dummy = n
while n_dummy > 0:
    out = str(n_dummy%k) + out
    n_dummy = int(n_dummy/k)
print(len(out))

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)
print(len(Base_10_to_n(a, b)))

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

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

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

Solution (Python):
k = 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)
x10 = k[0]
x2 = Base_10_to_n(x10, k[1])
print(len(x2))

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

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

Solution (Python):
import sys
import numpy as np


n,k=map(int,sys.stdin.readline().split())


i=-1
while True:
    i+=1
    if n<k**i:
        print(i)
        break

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

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

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

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

Solution (Python):



import sys
import numpy as np

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, K = i2nn()
    print(len(np.base_repr(N, K)))
    return

main()

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

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

ans = 1

for i in range(10000):
  if n // k > 0:
    ans += 1
    n = n // k
  else:
    break
print(ans)

Solution (Python):
import sys

def a(x, n):
    if (int(x/n)):
        return a(int(x/n), n)+str(x%n)
    return str(x%n)

def main():
    tmp = input().replace('\n','').split(' ')
    n = int(tmp[0])
    r = int(tmp[1])
    res = a(n, r)
    print(len(res))
if __name__ == '__main__':
    input = sys.stdin.readline
    main()

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):
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 = 0
while True:
    s = k ** i
    if n / s >= 1:
        i += 1
        continue
    else:
        break
print(i)

Solution (Python):
from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def main():
    n,k = map(int, input().split())
    t = 1
    for i in range(100):
        t *= k
        if n < t:
            print(i+1)
            return
        
   

main()

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(Base_10_to_n(n,k)))

Solution (Python):
N , M = (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 , M)
print(len(str(ans)))

Solution (Python):
def digits(k, x):
    ans = 0
    while (k):
        ans += 1
        k //= x
    print(ans)

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(line)
    k, x = [int(_) for _ in in_str[0].split(' ')]
    digits(k, x)

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

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

print(i)

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

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

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

N, K = MI()

print(math.ceil(math.log(N, K)) if N != 1 else 1)

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

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

Solution (Python):
x ,n = map(int,input().split())
def cb(x, n):
    if (int(x/n)):
        return cb(int(x/n), n)+str(x%n)
    return str(x%n)

print(len(cb(x,n)))

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]


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):
import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
N, K = [int(x) for x in input().strip().split()]
cnt = 1
c = K
while c <= N:
    c *= K
    cnt += 1

print(cnt)

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

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

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

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


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


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

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

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

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):
def base10to(n, b):
  if (int(n/b)):
    return base10to(int(n/b), b) + str(n%b)
  return str(n%b)

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

print(len(base10to(n, k)))

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

def solve():
    for i in range(1, 1000000):
        if n < k ** i:
            return i

print(solve())

Solution (Python):

import math

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

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

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

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

print(ans)

Solution (Python):
import math

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

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

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

ans = 0
while n > 0:
    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)
  
print(len(Base_10_to_n(N, K)))

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

Solution (Python):
if __name__ == "__main__":
    n, k = map(int, input().split())
    res = ''
    while n > 0:
        res += str(n % k)
        n //= k
    print(len(res))

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

c = 0

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

print(c)

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

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, K = MAP()

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

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

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

print(keta)

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

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

Solution (Python):

N,k=map(int,input().split())
idx=1
for i in range(N):
    if k**i>N:
        idx=i
        break
print(idx)

Solution (Python):
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
from fractions import gcd
from copy import deepcopy
import math
import queue


Mod = 1000000007
import sys
sys.setrecursionlimit(1000000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): 
    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))))

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(base10to(n,k)))

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

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

print(c)

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

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

    return count

if __name__ == "__main__":

    answer = main(N, K)
    print(answer)

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

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

print(ans)

Solution (Python):
[N,K] = list(map(int,input().split()))
output = 0
while N>0:
    output += 1
    newN = N//K
    if newN == N:
        break
    N = newN
print(output)

Solution (Python):

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

NK = input().split()

N = int(NK[0])
K = int(NK[1])

print(len(base10to(N, K)))

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

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):
N,K=map(int,input().split())
c=0
while N>0:
  N=N//K
  c+=1
print(c)

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

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

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

Solution (Python):
a,b=map(int,input().split())
s=1
ans=0
while s<=a:
    s = s*b
    ans = 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)


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

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

Solution (Python):


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

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

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

Solution (Python):
from math import ceil, log

n, k = map(int, input().split())
if n == 1:
    print(1)
else:
    print(ceil(log(n, k)))

Solution (Python):
import math

N, K = map(int, input().split())
count = 0
now = 1
while True:
    if N < now:
        break
    else:
        count += 1
        now *= K
        
print(count)

Solution (Python):
import numpy as np

n, k = np.asarray(input().split(), dtype=np.float64)

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

print(number)

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

res = 0

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

print(res+1)

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)

















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 = [int(x) for x in sys.stdin.readline().split()]  
    

    
    
    
    

    logger.debug('{}'.format([]))

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


if __name__ == "__main__":
    resolve()





import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """11 2"""
        output = """4"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """1010101 10"""
        output = """7"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """314159265 3"""
        output = """18"""
        self.assertIO(input, output)

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

i = 1
ans = 0

while N >= i:
  ans += 1
  i = i * 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())
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, raw_input().split())
c = 1
while n >= k:
    n /= k
    c += 1
print c

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

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

print(ans)

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

count = 0
while N > 0:
	N = int(N / R) 
	count += 1

print(count)

Solution (Python):
n,r = input().split()
n = int(n)
r = int(r)
t = 0
while True:
  if n // r**t == 0:
    break
  t += 1
print(t)

Solution (Python):

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

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

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

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

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

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

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

answer = count + 1
print(answer)

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 sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,k = LI()
cnt = 0
tmp = 1
while tmp <= n:
    tmp *= k
    cnt += 1
print(cnt)

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

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

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

Solution (Python):
n, k = map(int, input().split())
if k==2:
    print(len(bin(n)[2:]))
else:
    c = 1
    while True:
        if n // k**c > 0:
            c += 1
        else:
            break
    print(c)

Solution (Python):


def base(num, n):
    if int(num/n):
        return(base(int(num/n), n)+str(num%n))
    return(str(num%n))

if __name__ == "__main__":
    n, k = map(int, input().split())
    base_num = base(n, k)
    print(len(base_num))

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

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

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

answer=0
while N>0:
    N=int(N/K)
    answer+=1

print(answer)

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(list(str(x2))))

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

a = 1
n = 0
while a <= N:
    a *= K
    n += 1

print(n)

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):
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())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
print(len(Base_10_to_n(n,k)))

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

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

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

Solution (Python):
def num():
    return int(input())
def nums():
    return list(map(int,input().split()))
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

N,K = nums()
print(len(str(base_cvt(N,K))))

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

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

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

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

Solution (Python):
import math
def main():
    n,k=map(int,input().split())
    print(int(math.log(n,k))+1)
if __name__=='__main__':
    main()

Solution (Python):
N,K = map(int,input().split())
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
print(len(base_cvt(N,K)))

Solution (Python):

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

    count = 1
    while True:
        tmp = K ** count
        if tmp > N:
            print(count)
            break
        count += 1

    return 0


if __name__ == '__main__':
    main()

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

Solution (Python):
N, K = 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)

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

Solution (Python):
from math import log, ceil

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

if ceil(log(N, K)) == log(N, K):
    print(ceil(log(N, K)) + 1)
else:
    print(ceil(log(N, K)))

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

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

ans = Base_10_to_n(X, Y)
print(len(ans))

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

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