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



Sample input:
11 2


Sample output:
4

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
# K進数に直すのはライブラリとか使えんのかも？その辺は答えを見てかくにんしてみるか
count=1
while True:
    N/=K
    if not N>=1:
        break
    count+=1
print(count)

Submission status: Accepted

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

ans = x = 1
for i in range(1, 10000):
    x = x * k  # k ** i
    if x > n:
        ans = i
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = [int(x) for x in input().split()]
for i in range(10000):
    if N < K**i:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import log

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(ans))

Submission status: Accepted

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

count = 1

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

print(count)

Submission status: Accepted

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

count = 1

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

print(count)

Submission status: Accepted

Solution code:
# ABC 156: B – Digits
N, K = [int(s) for s in input().split()]

digits = 1

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

print(digits)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
#nをk進数で表す
pri_ans = k
ans = 1
while pri_ans <= n:
    pri_ans *= k
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ライブラリの読み込み
import math

#入力値の格納
n,k = map(int, input().split())

#n進数への変換定義
def convert(x,y):
    if int(x/y):
        return convert(int(x/y),y) + str(x%y)
    return str(x%y)

#n進数へ変換し長さを算出
text = len(convert(n,k))

#結果を表示
print(text)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(num)

Submission status: Accepted

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

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

print(c+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


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


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


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


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


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

Submission status: Accepted

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

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


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


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


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


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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


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


def main():
    n, k = list(map(int, input().split()))
    print(len(base_10_to_n(n, k)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

ans = int(np.log(n) // np.log(k)) + 1
print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N, K = rl()

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

Submission status: Accepted

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

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

print(ans+1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    if n < tmp:
        isFlg = True


    if isFlg:
        break

    i+=1


print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(shinsu)

Submission status: Accepted

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

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

print(shinsu)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

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

m = 0

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

print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
import math

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

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

print(ans);

Submission status: Accepted

Solution code:
N,K=input().split()
n,k=int(N),int(K)

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

Submission status: Accepted

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


# 再帰処理：関数の中でその関数自身が呼び出されること。→ 繰り返し処理の実装が可能
def conversion(_n, _m):
    if int(_n / _m):
        return conversion(int(_n / _m), _m) + str(_n % _m)
    return str(_n % _m)


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print (cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

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

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
INT_MAX=10**18+7
x=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
GETA=123
###############################################################################
import math as M
n,k=INPUT()
print(M.floor(M.log(n,k))+1)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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


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

Submission status: Accepted

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

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Digits
N, K = map(int,input().split())
judge = 1
i = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
ans = ""
while n != 0:
    n, r = divmod(n, k)
    ans = str(r) + ans
print(len(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if k!=10:
    print(len(Base_10_to_n(n,k)))
else:
    print(len(str(n)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 1

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int,input().split())
 
ans = 1

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
result=""
while N>0:
    result=str(N%K)+result
    N//=K
print(len(result))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B

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

a = K
i = 1

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

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, K = MAP()

for i in range(36):
  if N < K**i:
    print(i)
    break

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# int(input()) # 入力が1つ
n, k = map(int, input().split()) # 入力が複数
# [int(i) for i in input().split()] # 配列で数字

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, k = list(map(int, readline().split()))
    for i in range(10 ** 10):
        if n < k ** i:
            print(i)
            exit()


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

i = 1

while N > K - 1:
  N = N // K
  i += 1

print(i)

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
x=1000
l=0
while x>0:
  if l==0:
    x=n//k
    l+=1
  else:
    x=x//k
    l+=1
print(str(l))

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
i = 0
while True:
    a = n / (k ** i)
    if a < 1:
        #print(i)
        break
    else:
        #print(i)
        i += 1
print(i)

Submission status: Accepted

Solution code:
import math
k, n = map(int,input().split())
ans = math.log(k,n)
if ans == 0:
    ans = 1
print(math.ceil(ans))

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
N = i[0]
K = i[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(31):
    if N < K ** i:
        print(i)
        break

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split()))
for n in range(1000):
    if K ** n > N:
        print(n)
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in range(10**100):
    if K**i  <= N:
        i = i + 1
    else:
        ans = i
        break
        
print(ans)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math

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

Submission status: Accepted

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

ans = ''
while N > 0:
    ans = str(N%K) + ans
    N = N//K

print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
for i in range(0, 50):
    if n // (k**i) >= 1:
        continue
    else:
        print(i)
        break