Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,input().split())
    keta=1
    flag=0
    A=K
    while flag==0:
        if A<=N and A*K>N:
            print(keta+1)
            return
        A*=K
        keta= keta+1
main()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    A=K
    while flag==0:
        if A<=N:
            if A*K>N:
                print(keta+1)
                return
        A*=K
        keta= keta+1
main()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    while flag==0:
        if pow(K,keta)<=N and pow(K,keta+1)>N:
            print(keta+1)
            return
        keta= keta+1
main()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    A=K
    while not (A<=N and A*K>N):
        A*=K
        keta= keta+1
    print(keta+1)
main()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    A=K
    while flag==0:
        if A<=N and A*K>N:
            print(keta+1)
            return
        A*=K
        keta= keta+1
main()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    A=K**keta
    while flag==0:
        if A<=N and A*K>N:
            print(keta+1)
            return
        A*=K
        keta= keta+1
main()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    while flag==0:
        if K**keta<=N and K**(keta+1)>N:
            print(keta+1)
            return
        keta= keta+1
main()

Fixed submission:
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()

Buggy python submission (verdict: Runtime Error):
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()

Fixed submission:
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()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N,K=map(int,open(0).read().split())
    keta=1
    flag=0
    while flag==0:
        if K**keta<=N and K**(keta+1)>N:
            flag=1
        keta= keta+1
        #print(keta)

    print(keta)
main()

Fixed submission:
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()