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:
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 = list(map(int, input().split()))
print(math.floor(math.log(N, K)-1e-3)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8
import math

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

t1 = math.ceil(math.log(n,k))

print("{}".format(t1))

Submission status: Wrong Answer

Solution code:
N, K = [int(_) for _ in input().split()]
for a in range(0, 10**9):
    N = int(N / K)
    if N <= 0:
        print(a)
        break

Submission status: Wrong Answer

Solution code:
N, K = [int(_) for _ in input().split()]
for a in range(1, N):
    N = int(N / K)
    if N <= 0:
        print(a)
        break

Submission status: Wrong Answer

Solution code:
N, K = [int(_) for _ in input().split()]
for a in range(1, N):
    if K**(a-1) <= N and K**a > N:
        print(a)
        break

Submission status: Wrong Answer

Solution code:
import math
N, K = map(int,input().split())
M = ""
while True:
  M = str(N%K) + M
  N = N//K
  if N//K ==0:
    M = str(N) + M
    break

print(len(M))

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:
s = input().split()
N = int(s[0])
K = int(s[1])

i = 0

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

ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
if k == 10:
    print(len(str(n)))
else:
    t = n//k
    c = 1
    while t >= k:
        c += 1
        t = t//k
    print(c+1)

Submission status: Wrong Answer

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

digit = 1
while n > pow(k,digit):
  digit += 1

print(digit)

Submission status: Wrong Answer

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

digit = 0
while n > pow(k,digit):
  digit += 1
print(digit)

Submission status: Wrong Answer

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

result = 0
tmp = 1

while tmp < N:
    result += 1
    tmp = K ** (result)

print(result)

Submission status: Wrong Answer

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

result = 1
tmp = N

while tmp > K:
    tmp = tmp / K
    result += 1

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N, K = map(int, input('').split(' '))
print(int(-(-math.log(N, K) // 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:
N,K=map(int,input().split())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
if K == 10:
  print(len(str(N)))
else:
  res = 1
  KK = K
  while KK < N:
    res += 1
    KK *= K
  print(res)

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
if K == 10:
  print(len(str(N)))
else:
  res = 1
  while K < N:
    res += 1
    K **= 2
  print(res)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

max_base = [30, 22, 16, 15, 14, 13, 12, 11]
base = np.array([i for i in range(max_base[K-3])])

base = K**base
target = np.array([N]*max_base[K-3])

index = np.where(base <= target, 1, 0)

print(np.sum(index))

Submission status: Wrong Answer

Solution code:
import numpy as np

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

max_base = [30, 22, 16, 14, 13, 12, 11, 10]
base = np.array([i for i in range(max_base[K-3])])

base = K**base
target = np.array([N]*max_base[K-3])

index = np.where(base <= target, 1, 0)

print(np.sum(index))

Submission status: Wrong Answer

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

i = 1

while N//(R**(i)) > 1:
    if N//(R**(i+1)) == 0:
        break
    i += 1
    
print(i + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
count=0
K=a[1]
if(a[0]==a[1]):
  count+=1
while a[0]>1:
  a[0]//=a[1]
  count+=1
print(count)

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
count=0
K=a[1]
if(a[0]==a[1]):
  count+=1
while a[0]>1:
  a[0]/=a[1]
  count+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n, k = map(int, input().split())
if n % k == 0:
    x = math.log(n, k)
else:
    x = int(math.log(n, k)) + 1
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd
# fractions.gcd() を用いること
# math.log2()はatcoderでは対応していない．留意せよ．

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    n,k = map(int,input().split())
    eprint('math.log(n,k) ', end=':\n')
    eprint(math.log(n,k))
    d = math.ceil(math.log(n,k))
    print(d)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

# process
ans = 0
num = N
while num > 0:
    num //= K
    print(num)
    ans += 1

# output
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# import math
# import bisect
# import heapq
# from collections import deque
# import numpy as np

n, k = map(int, input().split())
count=1
base = k
while n > k:
    count += 1
    k *= base

print(count)

Submission status: Wrong Answer

Solution code:
def main():
    n,k = map(int, input().split())
    
    ans = 1
    for j in range(100000):
        ans *= k
        if ans >= n:
            print(j+1)
            break

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n,k = map(int, input().split())
    
    count = 1
    for j in range(100000):
        if (n / k) <= k:
            print(count+1)
            break
        else:
            n = n/k
            count += 1


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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


print(cnt)

Submission status: Wrong Answer

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

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

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:
n, k = map(int, input().split())
ans = []
while n > k :
  n = n // k
  mod = n % k
  ans.append(str(ans))
print("".join(ans))

Submission status: Wrong Answer

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

    if n < tmp:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
def main():
    N, K = [int(_) for _ in input().split()]
    i = 0
    while True:
        N_quotient = N // K
        N = N_quotient
        if N_quotient != 0:
            i += 1
        else:
            break
    print(i)
main()

Submission status: Wrong Answer

Solution code:
def main():
    N, K = [int(_) for _ in input().split()]
    i = 0
    while True:
        N_quotient = N // K
        if N_quotient != 0:
            i += 1
        else:
            break
    print(i)
main()

Submission status: Wrong Answer

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

    s = ''
    while True:
        N_quotient = int(N / K)
        N_reminder = N % K
        N = N_quotient
        s = str(N_reminder) + s
        if N_quotient < K:
            s = str(N_quotient) + s
            break
        print(s)
    print(len(s))
main()

Submission status: Wrong Answer

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

    s = ''
    while True:
        N_quotient = N / K
        N_reminder = N % K
        s = str(N_reminder) + s
        if N_quotient < K:
            s = str(N_quotient) + s
            break
    print(len(s))
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
ans = 0
while int(n / k) != 0:
  ans += 1
  n = int(n / k)
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:
def ans(n, k):
    if (int(n/k)):
        return ans(int(n/k), k)+str(n % k)
    return str(n % k)


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math

n, k = [int(x) for x in stdin.readline().rstrip().split()]

cnt = 1
if n <= k:
    print(cnt)
    exit

kk = k
while n >= kk:
    kk = kk * k
    cnt += 1


print(cnt)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math

n, k = [int(x) for x in stdin.readline().rstrip().split()]

cnt = 1
if n < k:
    print(cnt)
    exit

kk = k
while n > kk:
    kk = kk * k
    cnt += 1


print(cnt)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math

n, k = [int(x) for x in stdin.readline().rstrip().split()]

cnt = 1
if n < k:
    print(cnt)
    exit

kk = k
for i in range(100000000):
    kk = kk * k
    cnt += 1
    if n < kk:
        break

print(cnt)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math

n, k = [int(x) for x in stdin.readline().rstrip().split()]

cnt = 1
if n < k:
    print(cnt)
    exit

kk = k
for i in range(100):
    kk = kk * k
    cnt += 1
    if n < kk:
        break

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
for i in range(1, 10000)[::-1]:
    if N // (K ** i) != 0:
        print(i + 1)
        break

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
for i in range(1, 1000)[::-1]:
    if N // (K ** i) != 0:
        print(i + 1)
        break

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
for i in range(1, 300)[::-1]:
    if N // (K ** i) != 0:
        print(i + 1)
        break

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
for i in range(1, 100)[::-1]:
    if N // (K ** i) != 0:
        print(i + 1)
        break

Submission status: Wrong Answer

Solution code:
import math
x,y = map(int,input().split())
print(math.ceil(x/y))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=map(int, input().split())
i=0
while(K**i<N):
  i+=1
i-=1
count=''
for j in range(i+1):
  M=N//(K**(i-j))
  count+=str(M)
  N-=K**(i-j)*M

print(len(count))

Submission status: Wrong Answer

Solution code:
N,K=map(int, input().split())
i=0
while(K**i<N):
  i+=1
count=''
for j in range(i):
  M=N//(K**(i-j))
  count=str(M)+count
  N-=K**(i-j)*M

print(len(count))

Submission status: Wrong Answer

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

count=''
for j in range(i):
  M=N//(K**(i-j))
  count=str(M)+count
  N-=K**(i-j)*M
  
print(str(count))

Submission status: Wrong Answer

Solution code:
import numpy as np

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

N_ = np.base_repr(N, K)

print(N_)
print(len(str(N_)))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = n
c = 0
while True:
    a = a // k
    c += 1
    if a < k:
        print(c + 1)
        exit()

Submission status: Wrong Answer

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

a = n
c = 0
while True:
    a = math.floor(a / k)
    c += 1
    if a <= k - 1:
        print(c + 1)
        exit()

Submission status: Wrong Answer

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

a = n
c = 0
while True:
    a = math.floor(a / k)
    c += 1
    print(a)
    if a <= k - 1:
        print(c + 1)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while N > 1:
    result = str(N % K) + result
    N //= K

result = str(N % K) + result
len(result)

Submission status: Wrong Answer

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

result = " "
while N > 1:
    result = str(N % K) + result
    N //= K

result = str(N % K) + result
print(result)

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

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

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
flag = True
ans = []
while flag:
    M = N % K
    N = N // K
    ans.append(M)
    if N < K:
        ans.append(N)
        flag = False
print(len(ans))

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
flag = True
ans = []
while flag:
    M = N % K
    N = N // K
    ans.append(M)
    if N // K == 0:
        ans.append(N)
        flag = False
print(len(ans))

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

maxDigits = 0
for i in range(10):
  if N/K**i >= 1:
    maxDigits = i+1

print(maxDigits)

Submission status: Wrong Answer

Solution code:
import math
 
i = input().split()
N = int(i[0])
K = int(i[1])
result = 0
 
result = math.log(N, K)
if int(result) != result:
  result = 1 + int(result)
else:
  result = int(result)
 
print(result)

Submission status: Wrong Answer

Solution code:
import math

i = input().split()
N = int(i[0])
K = int(i[1])
result = 0

result = math.log(N, K)
if int(result) != result:
  result = 1 + int(result)

print(result)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

n,k = [int(x) for x in 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 = 1
while(n / k != 0):
  n //= k
  ans += 1
print(ans)

Submission status: Wrong Answer

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(10000000001) :
    p = pow(K,i)
    if (N <= p) :
        print(i)
        break

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:
def conv(x, n):
    nchar = '0123456789ABCDEF'
    digit = 0

    result = ''

    while x > 0:
        result = nchar[x % n] + result
        x = x / n

    return result
n, k = map(int, input().split())
print(n, k)

Submission status: Wrong Answer

Solution code:
from math import ceil, log

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

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

Submission status: Wrong Answer

Solution code:
n, k = list(map(int, input().split()))
cnt = 1
temp = n
flag = False
while True:
    temp = temp / k
    if temp > 1:
        flag = True
        cnt += 1
    else:
        break
print(cnt)

Submission status: Wrong Answer

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


def hoge(n, k):
    for i in range(n + 1):
        tmp = k ** i
        if tmp == n:
            return len(str(n))
        elif tmp > n:
            return i


print(hoge(N, K))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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:
N, K = tuple(map(int, input().split()))
i = 0
while(N > K ** i):
    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())

a=(n/k)
ans=1
while a>0:
	a = int(a/k)
	ans+=1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import log, ceil
N, K = map(int, input().split(' '))
digit = log(N, K)
if digit == int(digit):
    print(digit + 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:
N,K = map(int,input().split())
for i in range(10**9):
  print(K**i)
  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:
n,m=map(int,input().split()) 
lst_b=[] 
lst_c=[] 
while(True): 
    b=n//m 
    c=n%m 
    lst_b.append(b) 
    lst_c.append(c) 
    n=b 
    if b==0: 
    	print("".join(map(str,lst_c[::-1]))) 
    	break

Submission status: Wrong Answer

Solution code:
import math

N, K = map(float, input().split())
tans = math.log(N, K)

ans = math.ceil(tans)
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N, K = map(float, input().split())
tans = math.log(N, K)

ans = math.ceil(int(tans * 10**9)/10**9)
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N, K = map(float, input().split())
ans = int(math.ceil(int(math.log(N, K)*10**14)/10**14))
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N, K = map(float, input().split())
ans = int(math.ceil(int(math.log(N, K)*10**9)/10**9))
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N, K = map(float, input().split())
ans = int(math.ceil(math.log(N, K) * 10 **9) / 10 ** 9)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
from decimal import *

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

print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if K ** ans >= N:
    print(ans)
else:
    print(ans - 1)

Submission status: Wrong Answer

Solution code:
import os

def main():

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

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

    print(count)

if __name__ == "__main__":
    main()

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]
    count = 0

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

    print(count)

if __name__ == "__main__":
    main()

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:
def resolve():
    n, k = map(int, input().split())
    div_val = k
    i = 1
    while True:
        if n / div_val <= 1:
            print(i)
            return
        else:
            div_val *= k
            i += 1

resolve()

Submission status: Wrong Answer

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

l = []
while N >= K:
    a = N % K
    b = N // K
    N = b
    l.append(a)
    print('{}, {}'.format(a, b))

print(len(l) + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 = 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:
N,K=map(int,input().split())
x=0
while True:
	if N<=K**x:
		print(x)
		break
	x+=1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
i = 0
if n == 0:
    print(0)
else:
    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())
count = 0
while True:
    N = N / K
    count += 1
    if N <= K:
        count = count + 1
        break
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 = count + 1
        break
print(count)

Submission status: Wrong Answer

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

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