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:
a,b=map(int,input().split())
count=1
while a>b:
    a=a/b
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n, k = tuple(int(x) for x in input().split())

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

Submission status: Wrong Answer

Solution code:
n, k = tuple(int(x) for x in input().split())

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

Submission status: Wrong Answer

Solution code:
from math import *

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

print(ceil(log(n, k)))

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

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

ans = math.ceil(np.log(N)/np.log(K))

print(ans)

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
l=[int(x) for x in input().split()]
N=l[0]
K=l[1]
ans = []

while l[0] > l[1]:
  ans.append(int(N) % int(K))
  N = int(N) / int(K)
  if N < K:
    ans.append(int(N))
    break
    
print(len(ans))

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
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 N < K:
    ans.append(int(N))
    break
    
print(len(ans))

Submission status: Wrong Answer

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

print(math.ceil(math.log(n, r)))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 = [int(x) for x in input().split()]
count = 1
while True:
    if (n>k**(count)):
        count += 1
    else:
        break
print(count)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env 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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print(i)

Submission status: Wrong Answer

Solution code:
def calculate_num(m, n):
  integer = m
  base = n
  result = ''
  digit = 0
  while integer > 0:
    result += str(integer%base) + result
    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()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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)
print(len(ans) + 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=0
while True:
    if b**c<a:
        c=c+1
        continue
    else:
        print(c)
        break

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
i=1
u=0

if n==k:
    print(1)
    quit()
while n>u:
    u=k**i

    i+=1
print(i-1)

Submission status: Wrong Answer

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

    i+=1
print(i-1)

Submission status: Wrong Answer

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

    i=i+1
print(i)

Submission status: Wrong Answer

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

digits = 0
while n:
  digits += 1
  n//=10
  
print(digits)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
i = 1
while True:
    if n - k**i > 1:
        i+=1
        n -= k ** i
    else:
        i+=1
        break
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:
import math

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

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

Submission status: Wrong Answer

Solution code:
import sys

def main():

    # sys.stdin = open('input156b.txt')

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

    ans = 0
    m = 1
    while n > m:
        m *= k
        ans += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(n):
    if k ** i >= n:
        print(i)
        exit(0)

Submission status: Wrong Answer

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

import math
print(int(math.ceil(math.log(n)/math.log(k) )))

Submission status: Wrong Answer

Solution code:
def Digits(N, K):
  if not N:
    return 1
  digits = 0
  while not N:
    N = N // K
    digits += 1
  return digits
 
N, K = map(int, input().split())
print (Digits(N, K))

Submission status: Wrong Answer

Solution code:
def Digits(N, K):
  if N:
    return 1
  digits = 0
  while N:
    N = N // K
    digits += 1
  return digits

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    N, K = map(int, input().split())
    if N % K == 0:
        print(math.ceil(math.log(N,K))+1)
    else:
        print(math.ceil(math.log(N,K)))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    N, K = map(int, input().split())
    if K ==1:
        print(N+1)
    elif N % K == 0:
        print(math.ceil(math.log(N,K))+1)
    else:
        print(math.ceil(math.log(N,K)))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    n, k = map(int, input().split())
    a = 0
    while n > 0:
        a += 1
        n /= k
    print(a)
    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt=1
#if a%b==0:
#            cnt=0
while a>=b:
            a=a//b
            cnt+=1
            
print(cnt+1)

Submission status: Wrong Answer

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

cnt=1
if a%b==0:
            cnt=0
while a>b:
            a=a//b
            cnt+=1
            
print(cnt+1)

Submission status: Wrong Answer

Solution code:
N, M = map(int, input().split())
X = int(M)
ans = 1
while N > X:
  ans += 1
  X = X * M
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k = (int(_) for _ in input().split())

ans = 0
a = 1
while n>a:
	a = a*k
	ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while 1:
    if comp >= n:
        break
    r += 1
    comp = k ** r

print(r)

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

Submission status: Wrong Answer

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

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 = map(int,input().split())
ans = 1
for i in range(n):
  ans += 1
  n = int(n/k)
  if n < k:
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import os

def main():
    result_num = []
    a=[int(x) for x in input().split()]
    num,result = a[0],a[1]

    while(True):
        result_num.append(num%result)
        num = num//result
        if result > num:
            result_num.append(num)
            break

    print(len(result_num))
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N, K = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N, K = map(int, input().split())

res = 0
M = N
while M > 1:
    M /= 3
    res += 1
print(res)

Submission status: Wrong Answer

Solution code:
import numpy as np
N, K = map(int, input().split())

div = np.log(N) / np.log(K)
print(np.ceil(div).astype(int))

Submission status: Wrong Answer

Solution code:
import numpy as np
N, K = map(int, input().split())

div = np.log(N) / np.log(3)
print(np.ceil(div).astype(int))

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
l=[]
if k<=9 :
  while True:
    a=n%k
    n//=k
    if n>=k:
      l.append(a)
    elif n<k :
      l.append(n)
      break
  print(len(l))
else:
  print(len(str(n)))

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
l=[]
if k<=9 :
  while True:
    a=n%k
    n//=k
    if n>=k:
      l.append(a)
    if n<k :
      l.append(n)
      break
  print(len(l))
else:
  print(len(str(n)))

Submission status: Wrong Answer

Solution code:
import math

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

x = 0
while True:
    if N <= math.pow(K, x):
        print(x)
        break
    x += 1

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
l=[]
if k<=9 :
  while True:
    a=n%k
    l.append(a)
    n//=k
    if n<k :
      l.append(n)
      break
  print(len(l))
else:
  print(len(str(n)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while i <= 100000:
  if N <= K ** i:
    print(i)
    break
    
  else:
    i += 1

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:
a, b = input().split()
a, b = int(a), int(b)
 
digit = 0
for i in range(20):
  if a <= b ** i - 1:
    digit = i
    break
    
print(digit)

Submission status: Wrong Answer

Solution code:
a, b = input().split()
a, b = int(a), int(b)
 
digit = 0
for i in range(1000):
  if a <= b ** i:
    digit = i
    break
    
print(digit)

Submission status: Wrong Answer

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

digit = 0
for i in range(20):
  if a <= b ** i:
    digit = i
    break
    
print(digit)

Submission status: Wrong Answer

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

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:
import math

n, k = list(map(int, input().split()))
print(math.ceil(math.log(n, k)))

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:
import math

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

Submission status: Wrong Answer

Solution code:
import math


def main(n, k):
    print(math.ceil(math.log(n, k)))


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

    main(n, k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import log, ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

if math.log(n,k) == int(math.log(n,k)):
  res=math.log(n,k) + 1
else:
  res=int(math.log(n,k)) + 1

print(res)

Submission status: Wrong Answer

Solution code:
import math

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

if math.log(n,k) == int(math.log(n,k)):
  res=math.log(n,k) + 1
else:
  res=int(math.log(n,k)) + 2

print(res)

Submission status: Wrong Answer

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

keta=1
while s[0]>s[1]:
    s[0]=s[0]/s[1]
    keta+=1

print(keta)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
N, K = input().split()
N = float(N)
K = int(K)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while 1:
    n = n // k
    count += 1 
    
    if n < k:
        break

print(count)

Submission status: Wrong Answer

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

flg = True
cnt = 1
_ = K
while flg:
  _ = _*K
  if _ >= N:
    flg=False

  cnt += 1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
s = input().split()

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

i=1
while N > K **(i-1):
  if N < K**i:
    print(i)
  elif N == K**i:
    print(i+1)
  i += 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 = (int(x) for x in input().split())
a = 0
while True:
    if k ** a >= n: break
    else: a += 1
if a == 0: a += 1
print(a)

Submission status: Wrong Answer

Solution code:
n, k = (int(x) for x in input().split())
a = 0
while True:
    if k ** a >= n: break
    else: a += 1
print(a)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
i = input().split()

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

result = ''
tmp = N
while tmp >= K:
    idx = str(tmp % K)
    result = idx + result
    tmp = int(tmp / K)
idx = str(tmp % K)
result = idx + result

print(result)

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:
#input(K N)
i = list(map(int,input().split()))
K = i[0]
N = i[1]

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

answer = 0
flag = True

while True:
    answer += 1
    if k**answer>=n:
        break

print(answer)

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())
ans = 1
tmp = 1

while N >= tmp:
    tmp = tmp * K
    ans += 1

print(tmp)
print(ans-1)

Submission status: Wrong Answer

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

while N > tmp:
    tmp = tmp * K
    ans += 1

# print(tmp)
print(ans-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import math

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

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

if K==10 and ans==math.log(N,K):
    print(ans+1)
else:
    print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import math

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

print(int(-(-math.log(N,K)//1)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d =0
while(1):
    d +=1
    if n <= r**d:
        print(d)
        break

Submission status: Wrong Answer

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

d =0
while(1):
    if n > r**d:
        d +=1
    else:
        print(d)
        break

Submission status: Wrong Answer

Solution code:
import math

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

f = math.log(n, k)
print(math.ceil(f))

Submission status: Wrong Answer

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

count = 0
N_K = 1
while N > N_K:
    count += 1
    N_K *= K

print(count)

Submission status: Wrong Answer

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

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

main()

Submission status: Wrong Answer

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

if N < K:
  print(1)
  exit();

for i in range((N//K)+1):
  if K**i>=N:
    print(i)
    exit();

Submission status: Wrong Answer

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

if N <= K:
  print(1)
  exit();

for i in range(2,N//K):
  if K**i>=N:
    print(i)
    exit();

Submission status: Wrong Answer

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

for i in range(2,N//K):
  if K**i>=N:
    print(i)
    exit();

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

d = 0
while N:
    N //= 2
    d += 1

print(d)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

d = 1
while N:
    N //= 2
    d += 1

print(d)

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:
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 True:
    if N > K:
        i = N / K
        N = i
        cnt += 1
    else:
        if N != 0:
            cnt += 1
        break
print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k = map(int, input().split())


def log(r, d):
    return np.log(d)/np.log(r)


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

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k = map(int, input().split())


def log(r, d):
    return np.log(d)/np.log(r)


def ceil(x):
    if x.is_integer():
        return int(x)
    return int(np.ceil(x))


print(ceil(log(k, n)))

Submission status: Wrong Answer

Solution code:
from math import log, ceil

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

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:
import math
n,k = map(int,input().split())
print(int(math.log(k if n == 1 else n,k)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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