TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
x2 = 0
x10, n = input().split()
print(int(x10), int(n))
x10 = int(x10)
n = int(n)
x2 = Base_10_to_n(x10, n)
print( len(x2) )

def Base_n_to_10(X,n):
    out = 0
    for i in range(1,len(str(X))+1):
        out += int(X[-i])*(n**(i-1))
    return out#int out

N, K = input().split()
N = int(N)
K = int(K)
x = str(len(Base_n_to_10(N,K)))
print(x)

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
x2 = 0
x10, n = input().split()
x10 = int(x10)
n = int(n)
x2 = Base_10_to_n(x10, n)
print(len(x2))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = input().split()
print(len(str(int(n, int(k)))))

import numpy as np
n, r = map(int, input().split())
print(len(str(np.base_repr(n,r))))

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
a,b = list(map(int,input().split()))
for i in range(10)
   if b**i <= a < b**(i+1):
      ans = i
      break
    else:
      ans = no
print(ans)
      

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

N,K = list(map(int,input(),split()))
for i in range(100):
  if K**i <= N < K**(i+1):
    print(i+1）

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

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
, m = list(map(int, input().split(' ')))



def conversion(_n, _m):
    if int(_n / _m):
        return conversion(int(_n / _m), _m) + str(_n % _m)
    return str(_n % _m)


print(conversion(n, m))


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



def conversion(_n, _m):
    if int(_n / _m):
        return conversion(int(_n / _m), _m) + str(_n % _m)
    return str(_n % _m)


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


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K = map(int,input().split())
for i in range(1,10**9):
    if K**i <= N < K**(i+1):
        print(i+1)
    

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

Verdicts: Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
N,K=map(int,input().split())
if math.log(N,K).is_integer:
    print(int(math.log(N,K)))
else:
    print(int(math.log(N,K))+1)

import math
N,K=map(int,input().split())
x=math.log(N,K)
if x.is_integer():
    print(int(x)+1)
else:
    print(int(x)+1)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int,input().split())
ans = []
while n > 0:
    ans.append(int(n%k)) 
    n //= k

ans.reverse()

[print(i,end='') for i in ans]

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

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = input().split()
print(int(n, int(k)))

n, k = input().split()
import math
def findNumberOfDigits(n, base):
    dig = (math.floor(math.log(n) /
                      math.log(base)) + 1)
    print(dig)

findNumberOfDigits(int(n), int(k))

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
from sys import stdin

def rec(n, k, r):
  if n < k:
    return r
  else:
    q, mod = divmod(n, k)
    r += str(mod)
    n = q
    return rec(n, k, r)

def main():
  N, K = [int(x) for x in stdin.read().rstrip().split()]
  print(rec(N, K, ''))

from sys import stdin


def rec(n, k, cnt):
    if n < k:
        return cnt + 1
    else:
        q, mod = divmod(n, k)
        cnt += 1
        n = q
        return rec(n, k, cnt)


def main():
    N, K = [int(x) for x in stdin.read().rstrip().split()]
    print(rec(N, K, 0))


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int,input().split())
ans = 0
m = 1
while m > n:
  m*k
  ans += 1
print(ans)

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


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n=int(input())
k=int(input())
c=0
while n:
  c+=1
  n=n//k
print(c)

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k=int(input())

count=0

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

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k=map(int,input().split())
count=0
while m!=0:
    int(m) = n/k
    n=m
    count += 1
print(count)

n,k=map(int,input().split())
count=0
while int(m)!=0:
    int(m)= n/k
    n=int(m)
    count += 1
print(count)

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

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

Verdicts: Runtime Error

Runtime Error

Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=map(int,input().split())

i=0
a=[]
if K==10:
    print(len(str(N)))
else:
    while N>=K**i:
        i+=1
    i-=1
    for j in range(i+1):
        a.append(N//(K**(i-j)))
        N%=(K**(i-j))
        
    print(a)        

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

i=0
a=[]
if K==10:
    print(len(str(N)))
else:
    while N>=K**i:
        i+=1
    i-=1
    for j in range(i+1):
        a.append(N//(K**(i-j)))
        N%=(K**(i-j))
        
    print(len(a))        

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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()

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

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K = map(int,input().split())
count = 0
while N>0:
  N=N//K
  count +=1
  print(count)

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


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
from collections import deque

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

while n > 0:
    d.append(n % k)
    n = n // k
    
print(len(d))

n, r = map(int, input().split())
d = []

while n > 0:
    d.append(n % k)
    n = n // k
    
print(len(d))

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
#!/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)


#!/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)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
# input
N, K = map(int, input().split())

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

# output
print(ans)


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

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

# output
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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()

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = map(int, input().split())
cnt = 1
while True:
  if n <= k**cnt + 1:
    cnt++
print(cnt)

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

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

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

Verdicts: Runtime Error

Time Limit Exceeded

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int, input().split())
ans = 1
while(n / k != 0):
  n //= k
  ans += 1
print(ans)

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


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
N, K = input().split()
print(math.floor(math.log(N) / math.log(K)) + 1)

import math
N, K = input().split()
print(math.floor(math.log(K) / math.log(N)) + 1)

N, K = input().split()

print((math.floor(math.log(N) / math.log(K)) + 1))

def base_changer(number,base):
    buff=97+abs(base-10)
    dic={};buff2='';buff3=10
    for i in range(97,buff+1):
        dic[buff3]=chr(i)
        buff3+=1   
    while(number>=base):
        mod=int(number%base)
        number=int(number//base)
        if (mod) in dic.keys():
            buff2+=dic[mod]
            continue
        buff2+=str(mod)
    if (number) in dic.keys():
        buff2+=dic[number]
    else:
        buff2+=str(number)

    return buff2[::-1]  
N,K = map(int, input().split())
print(len(base_changer(N,K)))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)))

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) + 1
    return int(np.ceil(x))


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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import itertools
N,K = map(int,input().split())
for i in itertools.count(1):
  if N//(K**i)>=K:
    continue
else print(i)


import itertools
N,K = map(int,input().split())
for i in itertools.count(1):
  if N//(K**i)<K:
    print(i)
    break


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

for i in itertools.count(0):
  if N//(K**i)<K:
    print(i+1)
    break


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = map(int, input().split())
while N>K:
  a=N/K
  b+=1
print(b)  

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,m = map(int,input().split())
ct = 0

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

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

n,m = map(int,input().split())
ct = 0

while n > 0:
  ct+=1
  n//=m
  
print(ct)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = map(int,input().split())
i = 1
while True:
  x = k
  if (x >= n):
    print(i)
    break
  else:
    i = i + 1

n, k = map(int,input().split())
i = 1
x = k
while True:
  if (x >= n):
    print(i)
    break
  else:
    i = i + 1


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

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


Verdicts: Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)

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
a = r
while True:
  if n < a:
    break
  else:
    a *= r
    i += 1
print(i)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
#!/usr/bin/env python3
import sys


def solve(N: int, K: int):
    count = 0
    while True:
        N = N // K
        if N >= 1:
            count += 1
        else:
            break
    print (cont)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(N, K)

if __name__ == '__main__':
    main()


#!/usr/bin/env python3
import sys
import numpy as np
import math

def solve(N: int, X: "List[int]"):
    place = np.mean(X)
    place = round(place)
    result = 0
    for i in range(N):
        result += (X[i]-place) ** 2
    print(int(result))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    X = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, X)

if __name__ == '__main__':
    main()


#!/usr/bin/env python3
import sys


def solve(N: int, K: int):
    count = 0
    while True:
        N = N // K
        if N >= 1:
            count += 1
        else:
            break
    print (count+1)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(N, K)

if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)))

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
X,n = map(int,input().split(" "))
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
a=Base_10_to_n(X, n)
print(a)

X,n = 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(X, n))

X,n = map(int,input().split(" "))
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
a=Base_10_to_n(X, n)
print(len(str(a)))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

i = list(map(int, input().split()))
out = Base_10_to_n(i[0], i[1])
pritnt(out)

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
  
i = list(map(int, input().split()))
out = Base_10_to_n(i[0], i[1])
print(len(str(out)))

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int, input().split())

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

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)

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)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
str = input()
a, b = str.split()
a, b = int(a), int(b)

print(len(str(int(a, b))))


a, b = input().split()
a, b = int(a), int(b)
 
digit = 0
for i in range(100):
  if a <= b ** i - 1:
    digit = i
    break
    
print(digit)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):

s = input().split()
n = int(s[0])
k = int(s[1])

c =0
while n>(k-1):
    a = n%k
    n = (n-a)/k
    print(n)
    c += 1
print(c+1)


s = input().split()
n = int(s[0])
k = int(s[1])

c =0
while n>(k-1):
    a = n%k
    n = (n-a)/k
    c += 1
print(c+1)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
from sys import stdin


def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out


def get_result(data):
    print(data)
    N, K = data[0]
    return len(Base_10_to_n(N, K))

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)


from sys import stdin


def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out


def get_result(data):
    print(data)
    N, K = data[0]
    return len(Base_10_to_n(N, K))

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)


from sys import stdin


def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out


def get_result(data):
    N, K = data[0]
    return len(Base_10_to_n(N, K))

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = map(input().spilt())
y = 1
while n > 1:
    y += 1
    n = n // k
print(y)

n, k = map(int, input().spilt())
y = 1
while n > 1:
    y += 1
    n = n // k
print(y)


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
#n,r=list(map(int,input().split()))
n=10**9
r=2
for i in range(40,-1,-1):
    if r**i<=n:
        ans=i+1
        break
print(ans)

import math
n,r=list(map(int,input().split()))
#n=10**9
#r=2
for i in range(40,-1,-1):
    if r**i<=n:
        ans=i+1
        break
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)

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

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

    l.append(a)


print(len(l) + 1)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int,input().split())
c = 0
while n > 0:
  n = n//7
  c += 1
print(c)
  

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
num, base = input()
print(int(log(int(num), int(base)) + 1)

import math

num, base = input().split(' ')
print(int(math.log(int(num), int(base)) + 1))


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
x,y = map(int,input().split())
print(math.ceil(x/y))

x,y = map(int,input().split())
z = 1
a = 0
while x >= z:
  z = z * y
  a = a + 1
  if x < z:
  	print(a)
  	break

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    while flag==0:
        if K**keta<=N and K**(keta+1)>N:
            print(keta+1)
            return
        keta= keta+1

main()

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
    
def main():
    N,K=map(int,input().split())
    print(len(Base_10_to_n(N,K)))
main()

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=map(int,input().split())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def base10to(n, b):
  if (int(n/b)):
    return base10to(int(n/b), b) + str(n%b)
  return str(n%b)
N, K = map(int, input().split())
print(base10to(N, K))

def base10to(n, b):
  if (int(n/b)):
    return base10to(int(n/b), b) + str(n%b)
  return str(n%b)
N, K = map(int, input().split())
print(len(base10to(N, K)))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k=map(int,input().split())

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

print(a + 1)

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

print(a + 1)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int,input().split())
count = 0
while(n > k):
    n = n // k
    count = count + 1
print(count + 1)

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
a = input().split()
for i in range(len(a)):
    a[i] = int(a[i])

ind = 0
while a[0] > 0:
    a[0] = a[0] // a[i]
    ind +=1

print(ind - 1)

a = input().split()
for i in range(len(a)):
    a[i] = int(a[i])

ind = 0
while a[0] > 0:
    a[0] = a[0] // a[i]
    ind +=1

print(ind)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k=map(int,input().split())
ans=0
while n>k:
  n/=k
  n=int(n)
  ans+=1

print(ans+1)

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

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = [int(x) for x in input().split(' ')]

x = 0

while True:
  if N < (K ** x):
    print(x)
  x+=1

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



Verdicts: Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = map(int, input().split())
ans = 0
while N > K-1:
    ans += 1
    N //= K
    print(N)
print(ans+1)

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def Base_10_to_n(N, K):
    if (int(N/K)):
        return Base_10_to_n(int(N/K), K)+str(N%K)
    return str(N%K)

x10 = 35
x2 = Base_10_to_n(N, K)
x2 = str(x2)
print(len(x2))

N, K = map(int, input().split())
def Base_10_to_n(N, K):
    if (int(N/K)):
        return Base_10_to_n(int(N/K), K)+str(N%K)
    return str(N%K)

x10 = 35
x2 = Base_10_to_n(N, K)
x2 = str(x2)
print(len(x2))

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k=input().split();print(len(str(int(n,int(k)))))

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = map(int, input().split())
cnt = 0
while n // k > 0:
    cnt += 1
    n = n // k

print(cnt)

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

print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = map(int, input())

ans = 0
while True:
    N = N // K
    ans += 1
    if N == 0:
        break

print(ans)

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

ans = 0
while True:
    N //= K
    ans += 1
    if N == 0:
        break

print(ans)

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

ans = 0
while True:
    N //= K
    ans += 1
    if N == 0:
        break

print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=int(input().split())
ans = 0
while (N > 0):
  N //= K
  ans += 1
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

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

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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))


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

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
ount = 0       
n,k = map(int,input().split())      

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

print(count)


n,k = map(int,input())
lis = []

while n / k == 0:
    if n >k：
        lis.append(int(n % k))
        ing_total += 1
    else:
        if n >= 10:
            ing_total = 2
        else:
            ing_total = 1

print(ing_total)


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

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

print(count)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int, input().split())

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


print(cnt)

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

cnt = 1
while n < k:
    n = n // k
    cnt += 1


print(cnt)

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

print(cnt)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n = int(input())
x = [int(i) for i in input().split()]
x.sort()

ans = 10000
for p in range(1,x[-1]+1):
  sum =0
  for i in range(n):
    sum += (x[i]-p)**2
    
  ans = min(ans,sum)
  
print(ans) 

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

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
n,k = map(int, input().split())

N = int(math.floor(math.log(n)/math.log(k)))+1
m = n
L = []
for i in range(N+1):
  L.append(m//(k**(N-i)))
  m = m%(k**(N-i))
  
if L[0] == 0:
  L.pop(0)

ANS = [str(L[i]) for i in range(len(L))]
print("".join(ANS))

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

N = int(math.floor(math.log(n)/math.log(k)))+1
m = n
L = []
for i in range(N+1):
  L.append(m//(2**(N-i)))
  m = m%(2**(N-i))
  
if L[0] == 0:
  L.pop(0)

ANS = [str(L[i]) for i in range(len(L))]
print("".join(ANS))

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

L = []
while True:
  N = int(math.floor(math.log(n)/math.log(k)))
  L.append(N)
  n = n - k**N
  if n <= k-1:
    print(len(L)+1)
    exit()


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

L = []
while True:
  N = int(math.floor(math.log(n)/math.log(k)))
  L.append(N)
  n = n - k**N
  if n <= 2:
    print(len(L)+1)
    exit()


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

L = []
while True:
  N = int(math.floor(math.log(n)/math.log(k)))
  L.append(N)
  n = n - 3**N
  if n <= 2:
    print(len(L)+1)
    exit()

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

N = int(math.floor(math.log(n)/math.log(k)))+1
m = n
L = []
for i in range(N+1):
  L.append(m//(k**(N-i)))
  m = m%(k**(N-i))
  
if L[0] == 0:
  L.pop(0)

print(len(L))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = map(int, input().split())
ans = 1
tmp = 1

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

print(tmp)
print(ans-1)

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

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

# print(tmp)
print(ans-1)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = map(int, input().split())

s = ""
while(True):
  if n < k :
    s += str(n)
    break
  else :
    s += str(n%k)
    n = n//k

print(s)
print(len(s))

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

s = ""
while(True):
  if n < k :
    s += str(n)
    break
  else :
    s += str(n%k)
    n = n//k

print(len(s))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = map(int, input().split())
ans = 0
while N % K == 0:
    N = N // K
    ans += 1
print(ans)


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


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int,(input().split(" ")))

import math
a = (int(math.ceil(math.log(n)/math.log(k) )))
if a==0:
  print(1)
else
  print(a)

n,k = int(input().split(" "))
import math
print(int(math.ceil(math.log(n)/math.log(k) )))

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

import math
a = (int(math.ceil(math.log(n)/math.log(k) )))
if a==0:
  print(1)
else:
  print(a)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=map(int,input().split())
quotient=N
cnt=1
while quotient>=K:
    remainder=quotient%K
    quotient=(quotient-remainder)/K
    print(int(remainder),int(quotient))
    cnt+=1
print(cnt)

N,K=map(int,input().split())
quotient=N
cnt=1
while quotient>=K:
    remainder=quotient%K
    quotient=(quotient-remainder)/K
    cnt+=1
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
a,b=input().split()
a=int(a)
b=int(b)
i=0
while a>b:
    i+=1
    b*=b
print(i)

a,b=input().split()
a=int(a)
b=int(b)
c=b
i=1
while a>=c:
    c=c*b
    i+=1
print(i)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import queue
N,K = map(int,input().split())
ans = queue.Queue()
while N >= K:
    N,amari = divmod(N,K)
    ans.put(amari)
ans.put(N)
answer = ""
while not ans.empty():
    answer += str(ans.get())
print(answer)

import queue
N,K = map(int,input().split())
ans = queue.Queue()
while N >= K:
    N,amari = divmod(N,K)
    ans.put(amari)
ans.put(N)
answer = ""
while not ans.empty():
    answer += str(ans.get())
print(len(answer))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

N, K = map(int, input().split())
if K!=10:
  N = Base_10_to_n(N, K)
print( N )

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
 
N, K = map(int, input().split())
if K!=10:
  N = Base_10_to_n(N, K)
print( len(str(N)) )

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=map(int,input().split())
c=0
while (N//K)>0:
  c = c + 1
  N = N//K
print(c)

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




Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)      





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



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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k = map(int,input().split())
def base10to(n, k):
  if(int(n/k)):
    return base10to(int(n/k), k) + str(n%k)
  return str(n%k)
print(base10to(n,k))

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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
n,k = map(int,input().split())
print(int(math.log(k if n == 1 else n,k)))


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


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K = input().split()
N1 = int(N)
K1 = int(K)
for i in range (1000000):
    if K1**(i-1) <= N1 and N1 < K1**i:
        print(i)

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

Verdicts: Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = [int(x) for x in input().split(" ")]

i=1
x=K

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

print(i)

N, K = [int(x) for x in input().split(" ")]

i=1
x=K

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

print(i)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import sys
import math
n,k=map(int,input().split())

p=int(math.log2(n))

for i in range(p):
    if n//(k**i)<1:
        print(i)
        sys.exit()

import sys
import math
n,k=map(int,input().split())

p=int(math.log2(n))

for i in range(p+2):
    if n//(k**i)<1:
        print(i)
        sys.exit()

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N, K = map(int, input().split())

ans = 0

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

print(ans)

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

ans = 0

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

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n,k=map(int,input().split())
i=1

j=int(k**i)

import sys

while True:

    if n <=(j-1):

        print(i)

        sys.exit()

    else:
        i+=1
        pass


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


while n>=k**i:

    i+=1

else:
    print(i)


Verdicts: Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
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)

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

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

print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K = map(int,input().split())
print(int(math.log(N,K)+1))

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


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K = map(int, input(),split())

counter = 1
tmp = 1
while true:
    tmp *= K
    if tmp > N
        break
    counter += 1
print(counter)

N,K = map(int, input().split())
 
counter = 1
tmp = 1
while True:
    tmp *= K
    if tmp > N:
        break
    counter += 1
print(counter)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=map(int,input().split())
a=0
while N//K>=K:
  N=N//K
  a=a+1
print(a+1)




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

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K=map(int,input().split())
a = 1
while K <= N:
  N = N // K
  a +=a
 
print(a)

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

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

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

while R <= N:
  N = N // R
  a +=a

print(a)
  
  
  


N,K=map(int,input().split())
a = 0
while R <= N:
  N = N // R
  a +=a
 
print(a)

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
def main():
    N, M = map(int, input().split())
    A = [int(a) for a in input().split()]
    total = sum(A)
    cnt = 0
    for i in range(N):
        if A[i] < total*1.0/(4.0*M):
            pass
        else:
            cnt += 1
    if cnt >= M:
        print("Yes")
    else:
        print("No")
main()

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

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
N,K = map(int, input().split())
c = 1
K_ = 1
i=True
while i==True:
  K_ = K_ * K
  if N < K_:
    print(c)
    i=False
  counter += 1

N,K = map(int, input().split())
counter = 0
K_ = 1
i=True
while i==True:
  K_ = K_ * K
  if K > K_:
    print(counter)
    i=False
  counter += 1

N,K = map(int, input().split())
counter = 0
K_ = 1
while i=True:
  K_ = K_ * K
  if K > K_:
    print(counter)
    i=False
  counter += 1
  

N,K = map(int, input().split())
c = 1
K_ = 1
i=True
while i==True:
  K_ *= K
  if N < K_:
    print(c)
    i=False
  counter += 1


N,K = map(int, input().split())
c = 1
K_ = 1
i=True
while i==True:
  K_ = K_ *K
  if N < K_:
    print(c)
    i=False
  c += 1

Verdicts: Runtime Error

Time Limit Exceeded

Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
a,b = map(int,input().split())
count,rank = 1,b
while a < rank:
  count += 1
  rank *= b
print(count)

a,b = map(int,input().split())
count,rank = 1,3
while a < rank:
  count += 1
  rank *= 3
print(count)

a,b = map(int,input().split())
count,rank = 1,b
while a >= rank:
  count += 1
  rank *= b
print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
import math
n,k = map(int,input().split())
ans = math.ceil(math.log(k,n))
print(ans)

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

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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of digits that N has in base K.

Submission attempts (in order):
n, k = map(int, input().split())
count = 0
i = 0
while n >= k ** i:
    n = n - k ** i
    count += 1
    i += 1
print(count)

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

Verdicts: Wrong Answer

Accepted