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

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

Solution (Python):
N,K=map(int, input().split())
l=[]
for i in range(40):
    if N>=K**i:
        l.append(i)

    else:
        break

print(l[-1]+1)

Solution (Python):
n, k = map(int, input().split())
result = ''
while n != 0:
    result = str(n % k) + result
    n = n // k
result = int(result)
i = 0
while  result / 10 ** i >= 1:
    i += 1
print(i)

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

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

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

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

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

i, N = map(int,input().split())
print(len(base10to(i,N)))

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

Solution (Python):

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

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

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

print(d)

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

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

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

Solution (Python):
n,m=map(int,input().split()) 
lst_b=[] 
lst_c=[] 
while(True): 
    b=n//m 
    c=n%m 
    lst_b.append(b) 
    lst_c.append(c) 
    n=b 
    if b==0: 
    	print(len("".join(map(str,lst_c[::-1])))) 
    	break

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

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

Solution (Python):
import os

def main():

    N,K = (int(x) for x in input().split())
    count = 0

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

    print(count)

if __name__ == "__main__":
    main()

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())
q=N

keta = 0
for num in range(100):
    q, mod = divmod(q, K)
    keta=keta+1
    if q==0:
        break


print(keta)

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

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


def conv(a, b):
    if int(a/b):
        return conv(int(a/b), b) + str(a % b)
    return str(a % b)


print(len(conv(N, K)))

Solution (Python):
def main():

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

if __name__ == '__main__':
    print(main())

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

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

ans = 0

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

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(int(1e6))

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

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

Solution (Python):
import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
from functools import lru_cache
INF = 1 << 60


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

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

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

Solution (Python):
n,k=[int(i) for i in input().split()]
i=1
while True:
  if n>=k**i:
    i+=1
  else:
    break
print(i)

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

l = []
while N >= K:
    a = N % K
    N = N // K

    l.append(a)


print(len(l) + 1)

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

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

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

digits = []
N_tmp = N
while N_tmp > 0:
    digits.append(N_tmp % K)
    N_tmp //= K


print(len(digits))

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

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

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

Solution (Python):
list_input = list(map(str,input().split()))
n, k = int(list_input[0]), int(list_input[1])

counter = 0

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

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

Solution (Python):
N,K = map(lambda i: int(i),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):
def change(n,k):
    if n == 0 :
        return x
    else:
        x.append(n % k)
        return change(n // k,k)

n,r = map(lambda x: int(x),input().split())
global x
x = []
print(len(change(n,r)))

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

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

n, k = list(map(int, input().split()))
r = 1
while (n >= k**r):
  r = r + 1
print(r)

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

ans = 0
i = 0

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

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

counter = 0
if a == 0:
    pass
else:
    while a!= 0:
        a = int(a/b)
        counter+=1

print(counter)

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

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

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

A = int(N)
count = 0
while (A!=0):
  A = int(A/K)
  B = int(A%K)
  count +=1
print(count)

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

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())
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 main():
    info = input()
    info = info.split()
    
    number = info[0]
    add_cim = int(info[1])
    
    replace_number = "".join(list(reversed(number)))
    check_number = 0
    for num in range(len(replace_number)):
        check_number = check_number + int(replace_number[num])*(10**num)
    
    result_num = ""
    while True:
        if check_number < add_cim:
            result_num = result_num + str(check_number % add_cim) 
            break
        else:
            result_num = result_num + str(check_number % add_cim)
            check_number = int(check_number / add_cim)
    
    print(len(str(result_num)))

if __name__ == "__main__":
    main()

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

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

Solution (Python):

"""
Created on Sun Mar  1 14:25:07 2020

@author: Kanaru Sato
"""

N, K = map(int, input().split())
r = N
res = 0

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

print(res+1)

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

Solution (Python):
n, x = map(int, input().split())
ans = []
while n!=0 :
    ans.append(n % x)
    n = n // x
print(len(ans))

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

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

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

def func(n,k):
    count = 0
    while True:
        if n / k >= 1:
            n //= k
            count += 1
        else:
            break
    return count + 1

print(func(n,k))

Solution (Python):
N, K = [int(x) for x in input().split(' ')]
 
x = 0
 
while True:
  if N < (K ** x):
    print(x)
    break
  x+=1

Solution (Python):
import math
import string


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


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


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

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

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)


a = Base_10_to_n(a, b)
print(len(a))

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
 
data_list = list(map(int,input().split(" ")))
ans = Base_10_to_n(data_list[0], data_list[1])
print(len(ans))

Solution (Python):
def reVal(num):
	if (num >= 0 and num <= 9):
		return chr(num + ord('0'))
	else:
		return chr(num - 10 + ord('A'))
def strev(str):
	par = len(str)
	for i in range(int(par / 2)):
		temp = str[i]
		str[i] = str[par - i - 1]
		str[par - 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 = list(map(int,input().split()))
res = ""; 
x = fromDeci(res, k, n)
print(len(x))

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

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

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

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

Solution (Python):
def f(x, y):
  a = x // y
  if a:
    return 1 + f(a, y)
  else:
    return 1

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

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

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

Solution (Python):
def from_n_to_k(n, k):
  keta = []
  while n >= k:
    a = n % k
    keta.append(a)
    n = n // k
  return len(keta) + 1

num = [int(n) for n in input().split()]

r = from_n_to_k(num[0], num[1])
print(r)

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

Solution (Python):
import math

N, K = map(int, input().split())
print(1 if N == 1 else math.ceil(math.log(N, K)))

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

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

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

Solution (Python):
inputs=input().split(" ")
N=int(inputs[0])
K=int(inputs[1])
i=0

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

i+=1

print(i)

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

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

print(ans)

Solution (Python):
import math
n = [int(e) for e in input().split(" ")]
print(math.ceil(math.log(n[0], n[1])) if n[0] != 1 else 1)

Solution (Python):
def cal(N, K, cnt):
  return cnt if N < K else cal(N/K, K, cnt + 1)

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

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

ans = ''
while n:
	ans += str(n % k)
	n //= k
print(len(ans))

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

import numpy as np

m = np.log(N)/np.log(K) +1
print(int(m))

Solution (Python):

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

Solution (Python):
n,k=map(int, input().split())
keta=0
w = True
t = n
while w:
    t = t /k
    keta = keta+1
    if t < 1 :
         w = False
print(keta)

Solution (Python):
import numpy as np
import math as m

def main(**kwargs):
    r = int(m.log(n) / m.log(k)) + 1
    return r

if __name__ == "__main__":
    cin = np.array(input().split(" ")).astype("int")
    n, k = cin

    cout = main(n=n, k=k)
    print(cout)

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

while N >= K:
    a = N % K
    ans_list.append(a)
    N = N / K

ans_list.append(N / K)

print("{}".format(len(ans_list)))

Solution (Python):
import numpy as np

def main(n, k):
    res = int(np.log(n) / np.log(k)) + 1
    return res

if __name__ == "__main__":
    cin = input()
    n = int(cin.split(" ")[0])
    k = int(cin.split(" ")[1])
    cout = main(n, k)
    print(cout)

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

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
 
x10 = n
x2 = Base_10_to_n(x10, k)
s = list(' '.join(x2).split())
print(len(s))

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

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

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

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

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

Solution (Python):
from math import log, ceil

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

if ceil(log(n,k)) != log(n,k):
    print(ceil(log(n,k)))
else:
    print(ceil(log(n,k))+1)

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

integer = num[0]
base = num[1]
count = 1

while integer >= base:
  integer = integer // base
  count = count + 1

print(count)

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

Solution (Python):
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

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

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

if __name__ == '__main__':
    main()

Solution (Python):
n,k=input().split() 
n=int(n) 
k=int(k) 
c=0 
while n>0: 
  n=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)


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

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

print(i)

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

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

print(ans)

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

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

print(digit)

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

Solution (Python):
import sys
import os


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

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

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

    print(ret)


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))


n,k = miinps()

ans = 0

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

print(ans)

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

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

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

Solution (Python):
a = input().split(" ")
suji = a[0]
sinsu = a[1]
count = int(0)

for i in range(100):
  if suji == 0:
    break
  else:
    suji = int(suji) // int(sinsu)
    count = count + 1 

print(count)

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

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

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

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

Solution (Python):
from math import *

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

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

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

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

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

print(cnt)

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

Solution (Python):
import numpy as np
import math

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

ans = math.floor(np.log(N)/np.log(K))+1

print(ans)

Solution (Python):
N, K = tuple(list(map(int, input().split(' '))))
count = 1
while True:
    if N < K:
        break
    else:
        N = int(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):
l=[int(x) for x in input().split()]
N=l[0]
K=l[1]
ans = []

while True:
  ans.append(int(N) % int(K))
  N = int(N) / int(K)
  if int(N) == 0:
    break
  elif N < K:
    ans.append(int(N))
    break
    
print(len(ans))

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

ans = 1

for i in range(n):
    if k**(i-1) <= n and n < k**i:
        ans = i
        break

print(ans)

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

Solution (Python):
l=[str(x) for x in input().split()]
n=int(l[0])
base=l[1]
op=str()
while n>0:
	op=op+str(int(n)%int(base))
	n=int(n)//int(base)
print(len(op))

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

count = 1

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

print(count)

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

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

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

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())
ret = math.floor(math.log(n, k) + 1)
print("{}".format(ret))

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

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

count = 1

while N >= K:
  N = int(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):
n, k = map(int, input().split())

ans = 0

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

print(ans+1)

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

r = 0
n = N
while True:
    q, m = divmod(n, K)
    r += 1

    if q < K:
        if q != 0:
            print(r+1)
        else:
            print(r)
        break

    n = q

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

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

print(cnt)

Solution (Python):
n, k = [int(x) for x in input().split()]
count = 1
while True:
    if (n>=k**count):
        count += 1
    else:
        break
print(count)

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

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

print(n)

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

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

print(i)

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

N, K = int(N), int(K)

i = 0

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

Solution (Python):
number, base = map(int, input().split())
devision = number
list = []
while(devision>=base):
    surplus = devision % base
    devision = int(devision / base)
    
    list.insert(0,surplus)
    
list += [devision]

print(len(list))

Solution (Python):
N, K = map(int, input().split())
q = ''
while True:
    q += str(N % K)
    N = N // K
    if N == 0:
        break
print(len(q))

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

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

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

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

disits()

Solution (Python):
def calculate_num(m, n):
  integer = m
  base = n
  result = ''
  digit = 0
  while integer > 0:
    result += str(integer%base)
    integer = integer//base
    digit = len(result)
  return digit

def main():
  num = input()
  num_list = num.split()
  number = int(num_list[0])
  base = int(num_list[1])
  result = calculate_num(number, base)
  print(result)
main()

Solution (Python):


i = 1
nums = input()
nums = nums.split(' ')
x, y = (int(val) for val in nums)

while x >= y:
    x = x / y
    i += 1

print(i)

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

Solution (Python):


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())
print(math.floor(math.log(N,K)) + 1)

Solution (Python):
import math

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

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

Solution (Python):
numbers =input().rstrip().split()

n =int(numbers[0])
k =int(numbers[1])
i=1
while n>=k**i:
    i=i+1
print(i)

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

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

Solution (Python):

"""
Created on Thu Feb 27 09:12:42 2020

@author: 17664
"""

a, k = map(int, input().split())
cnt = 0

while a:
    a //= k
    cnt += 1
    
print(cnt)

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

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

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

print(ans)

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

for i in range(1,50):
  if n < k ** i:
    print(i)
    break

Solution (Python):
list = input().split()
N = int(list[0])
K = int(list[1])
x = 0
while N != 0:
  N = N // K
  x += 1
print(x)

Solution (Python):
NandK = input()
NandK = NandK.split(' ')
N = int(NandK[0])
K = int(NandK[1])
ans = []
while (N / K) >= K:
    ans.append(N % K)
    N = int(N / K)
if len(ans) != 0:
    print(len(ans) + 2)
else:
    print(len(ans) + 1)

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

s = []
while N >= 1:
  q, mod = divmod(N, K)
  s.append(mod)
  N = q

print(len(s))

Solution (Python):

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

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

print(a)

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

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

print(ans)

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



def kurai(n,k):
	for i in range(100):
		if k**(i) > n:
			return i



print(kurai(n,k))

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

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
InputValue = input().split(' ')

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

MaxN = 10
for i in range(9):
    MaxN = MaxN * 10

Count  = 1
if 1<=N<=MaxN and 2<=K<=10:
    Result = N // K
    while Result > 0:
        Result = Result // K
        Count+=1
print (Count,end='\n')

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

ans = 0
while pow(K, ans) <= N:
    ans += 1

print(ans)

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

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

Solution (Python):

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

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

ans = 1

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

print(ans)

Solution (Python):
from sys import stdin
N, K = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
while N > 0:
    N //= K
    ans += 1
print(ans)

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

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

digits = 0
while n:
    digits += 1
    n //= k

print(digits)

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

degit = 1

Q = N%K
R = (N-Q)/K

while R>0:
  Q = R%K
  R = (R-Q)/K
  degit += 1

print(degit)

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

digit = 1
while src[1] ** digit - 1 < src[0]:
    digit += 1

print(digit)

Solution (Python):
raw = input().split()
li = list(map(int, raw))
n = li[0]
k = li[1]

flag = 0
while 0 < n:
    flag += 1
    n = int(n / k)

print(flag)

Solution (Python):
N,K=map(int,input().split())
for p in range(0,1000):
    if K**p > N:
        break

print(p)

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

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

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

for i in range(0,1000000000):
    t=k**i
    if n<t:
        print(i)
        break

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

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

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

Solution (Python):

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

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

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

print(cnt)

Solution (Python):
N, K = map(int,input().split())
ans = ""
W = 1
while N>0:
    W *= K
    ans = str((N%W)//(W//K)) + ans
    N -= N%W
print(len(ans))

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

Solution (Python):
import numpy as np
import math
i = list(map(int, input().split()))
N = i[0]
K = i[1]

z = math.log(i[0],i[1])
z = int(z)
print(z+1)