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: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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


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


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
import sys

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


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


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

while num  >= k:
    num = num // k

print(count)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

for i in range(2, 11, 1):
    if N <= K ** i:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

print(math.ceil(math.log(N, K)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

i = 0
while n >= k**i:
    i = i+1
    n = n-k**i

print(i+1)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

print(len(str(n)))

Submission status: Wrong Answer

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

    if temp < K:
        print(i+1)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
# print(N,K)
temp = N
for i in range(1,100):
    temp = int(temp/K)
#     print(i)
#     print(temp)
    if temp < K:
        print(i+1)
        break

Submission status: Wrong Answer

Solution code:
n,k = map(int, input().split())
# n,k = map(int, "282475249 7".split())

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

    if n <= tmp:
        isFlg = True

    i+=1

    if isFlg:
        break

print(i)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


############ ---- Input Functions ---- ############
def in_int():
    return (int(input()))


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


def in_str():
    s = input()
    return (list(s[:len(s) - 1]))


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

mod = 7 + 10**9


n, k = in_ints()

import math
print(math.ceil(math.log(n,k)))

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
x,y = map(int,input().split())

for i in range(10**10):
    if y**(i+1) >= x:
        print(i+1)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans=0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=(int(x) for x in input().split())
k=0
a=K
while a<=N:
    k=+1
    a=K*10**k
print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
s=k
for i in range(1000000):
  s*=k
  if s>n:
    print(i+2)
    exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(0,1000):
    if n>k**i:
        continue
    if n<=k**i:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
x = 1
counter = 0
if a[0] < a [1]:
    counter = a[0]
else:
    while x<a[0]:
        counter += 1
        x = x*a[1]
print (counter)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
x = 1
counter = 0
if a[0] == 1:
    counter = 1
else:
    while x<a[0]:
        counter += 1
        x = x*a[1]
print (counter)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
x = 1
counter = 0
if a[0] == 1:
    print(1)
else:
    while x<a[0]:
        counter += 1
        x = x*a[1]
print (counter)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
x = 1
counter = 0
while x<a[0]:
  counter += 1
  x = x*a[1]
print (counter)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
x = 1
counter = 1
while x<a[0]:
  counter += 1
  x = x*a[1]
print (counter)

Submission status: Wrong Answer

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.ceil(M.log(n,k)))

Submission status: Wrong Answer

Solution code:
import math

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

if N < K:
    digit = 1
elif N % K == 0:
    digit = math.ceil(math.log(N)/math.log(K)) + 1
else:
    digit = math.ceil(math.log(N)/math.log(K))

print(int(digit))

Submission status: Wrong Answer

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())
  ans = math.log(1,2)
  print(math.ceil(ans))
  
  
  
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
n , k = map(int,input().split())
ans = []
ans.append(n%k)
n = n//k
while n >= k:
    ans.append(n%k)
    n = n//k
ans.append(n)

print(len(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    if n < k:
        break
    else:
        count += 1
        continue
print(count + 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
i=2
while a//b>=b:
    a=a//b
    i+=1
print(i)

Submission status: Wrong Answer

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

ans = []

while(True):
  tmp_ans = N // K
  tmp_amari = N % K

  ans.insert(0, tmp_amari)
  N = tmp_ans
  if tmp_ans < K:
    ans.insert(0, tmp_ans)
    break

print(len(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B

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

a = K
i = 1

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math
from decimal import *

D = math.log(N, K)

E = Decimal(D).quantize(Decimal('0'), rounding=ROUND_UP)
print(E)

Submission status: Wrong Answer

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

import math
D = math.log(N, K)
print(math.ceil(D))

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

n, k = map(int, input().split())
print(math.ceil(math.log2(n)/math.log2(k)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
a=[N//K]
i=0
while a[i]//K>=K:
  a.append(a[i]//K)
  i+=1
print(len(a)+2)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
con = 0
lis = list()
Z = K

while Z < N:
    Z = K**con
    con += 1
if N < K:
  print(1)
else:
  print(con-1)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
con = 0
lis = list()
Z = K
while Z < N:
    Z = K**con
    con += 1
print(con-1)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
con = 0
lis = list()
Z = K
while Z < N:
    Z = K**con
    con += 1
print(con-1)
#lis = append[1]
#print(lis)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

N = a[0]
K = a[1]
count = 1
while 1:
    if N <= K**count:
        print(count)
        break
    count += 1

Submission status: Wrong Answer

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

N = a[0]
K = a[1]
count = 1
while 1:
    if N <= K**count:
        print(count)
        break
    else:
        count += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if n==0:
  print(1)
  exit()
  
print(int(math.ceil(math.log(n,k))))

Submission status: Wrong Answer

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

if n==0:
  print(0)
  exit()
  
print(int(math.ceil(math.log(n,k))))

Submission status: Wrong Answer

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

print(int(math.ceil(math.log(n,k))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,D=[int(s) for s in input().split()]
d=1
n=D
while n<N:
  d+=1
  n*=D
print(d)

Submission status: Wrong Answer

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

cnt = 1
i = 0
while True:
    if r**i >= n:
        if i != 0:
            cnt -= 1
        break
    else:
        cnt += 1
        i += 1

print(cnt)

Submission status: Wrong Answer

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

cnt = 1
i = 0
while True:
    if r**i >= n:
        cnt -= 1
        break
    else:
        cnt += 1
        i += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import math

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

val = math.floor(N/K)
count = 1
while val >= K:
    val=math.floor(val/K)
    count += 1

print(count+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
p,q= input().split()
a,b =(int(p), int(q))
ans= 0
for i in range(a):
    rank = a / (b ** i)
    if  rank < 1:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
p,q= input().split()
a,b =(int(p), int(q))
ans= 0
for i in range(10):
    rank = a / (b ** i)
    if  rank < 1:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = 1

while True:
  if n > k ** d:
    d += 1
  else:
    print(d)
    exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

"""
#####関数をつかってみる．#####
######今回は二進数に変換######
x10 = 35
x2 = Base_10_to_n(x10, 2)
print( x2 )#"100011"が表示される．
#
#http://www.pursue.ne.jp/jouhousyo/sysad/sysad010.htm
#
"""

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

i = 0
h = 1
while h < n:
    h = k ** i
    i += 1

if h == n:
    print(i)
elif i == 0:
    print(1)
else:
    print(i - 1)

Submission status: Wrong Answer

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

i = 0
h = 1
while h < n:
    h = k ** i
    i += 1

if h == n:
    print(i)
else:
    print(i - 1)

Submission status: Wrong Answer

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

i = 0
h = 1
while h < n:
    h = k ** i
    i += 1

print(i - 1)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
counter = 1
while not n <= 1:
    n = int(n / k)
    counter += 1
print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    for i in range(100):
        if k ** i < n:
            continue
        else:
            print(i)
            return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,k = iim()
ans = 0
while k**ans < n:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N, R = map(int, input().split())
if N >= 10:
    ans = R
else:
    ans = R + 100 * (10 - N)
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Wrong Answer

Solution code:
N,K= map(int, input().split())
A = 0
cnt = -1
if N == 0:
    print(1)
else:
    while N >= A:
        cnt += 1
        A = K**(cnt+1)-1
    print(cnt+1)

Submission status: Wrong Answer

Solution code:
N,K= map(int, input().split())
A = 0
cnt = -1
if N == 0:
    print(1)
else:
    while N >= A:
        cnt += 1
        A = K**(cnt+1)-1
        print(A)
    print(cnt+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

list = []

for i in range(100000000):
    list.append(N % K)
    N = N / K
    i = i + 1
    if N < K:
        print(i + 1)
        break

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

ans = 0

for i in range(0,31):
    x = k**i
    if n <= x:
        print(ans)
        break
    else:
        ans += 1

Submission status: Wrong Answer

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

cnt = 1
for i in range(N):
    if K ** (i + 1) >= N:
        break
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

r = 0
ans = 0
for i in range(N):
    r = K ** (i + 1)
    ans += 1
    if r >= N:
        break

print(ans)

Submission status: Wrong Answer

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

r = 0
ans = 0
for i in range(N):
    r = K ** (i + 1)
    ans += 1
    if r >= N:
        print(ans)
        break

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/B-Digits.py
#
# 1<= n <= 10**9
# 2<= k <= 10
#

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

digits = int(1)

if k == 10:  # 10進数のときは，2~9進数の場合と違う
    n_str = str(n)
    digits = len(n_str)

else:
    for digit in range(1, 30):  # 2**29 < 10**9 < 2**<30 なので最高でも30桁
        if k ** digit < n:
            digits = digits + 1
        else:
            break

print(digits)

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/B-Digits.py
#
# 1<= n <= 10**9
# 2<= k <= 10
#

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

digits = int(1)

for digit in range(1, 30):  # 2**29 < 10**9 < 2**<30 なので最高でも30桁
    if k**digit < n:
        digits = digits + 1
    else:
        break

print(digits)

Submission status: Wrong Answer

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

def f(n, k):
    if n//k:
        return f(n//k, k) + str(n%k)
    else:
        return str(n%k)

print(f(N, K))

Submission status: Wrong Answer

Solution code:
input=input().split()
N=int(input[0])
K=int(input[1])
i=1
while(K**i<N):
    i=i+1
print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
 
x = [int(x) for x in input().split()]
 
print(math.ceil(math.log(x[0],float(x[1]))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(cnt)

Submission status: Wrong Answer

Solution code:
def main():
    a, b = list(map(int, input().split()))
    flag = 1
    d = 1
    while flag:
        if b**d >= a:
            flag = 0
        else:
            d += 1
    print(d)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
flag = 1
d = 0
while flag:
    if b**d >= a:
        flag = 0
    else:
        d += 1
print(d)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

for i in range(10000):
    k = y**i
    if k >= x:
        break
print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

n,k = str(input()).split()
if int(n) == 0:
    print(1)
else:
    ans = np.log(int(n))/np.log(int(k))
    print(math.ceil(ans))

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

n,k = str(input()).split()
ans = np.log(int(n))/np.log(int(k))
print(math.ceil(ans))

Submission status: Wrong Answer

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

for n in range(1,36):
    if N<=K**n:
        digit=n
        break
print(digit)