problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02766 | 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
| [
"literal.number.integer.change",
"call.arguments.change"
] | 560,379 | 560,378 | u607729897 | python |
p02766 | n, k = map(int, input().split())
x = k
ans = 1
while n > x:
x *= k
ans += 1
print(ans)
| n, k = map(int, input().split())
x = k
ans = 1
while n >= x:
x *= k
ans += 1
print(ans)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,384 | 560,385 | u984664611 | python |
p02766 | # スペース区切りの整数入力
N,K = map(int, input().split())
for i in range(10000000000000):
if N <= K ** i:
break
print(i)
| # スペース区切りの整数入力
N,K = map(int, input().split())
for i in range(10000000000000):
if N <= K ** i - 1:
break
print(i)
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 560,390 | 560,391 | u029021990 | python |
p02766 | n,k = list(map(int, input().split()))
ans = ""
while n != 0:
ans = str(n%k) + ans
n //= k
print(ans) | n,k = list(map(int, input().split()))
ans = ""
while n != 0:
ans = str(n%k) + ans
n //= k
print(len(ans))
| [
"call.arguments.add",
"call.arguments.change"
] | 560,401 | 560,402 | u382431597 | python |
p02766 | N,K=list(map(int,input().split(' ')))
i=0
while N>K**i:
i=i+1
print(i) | N,K=list(map(int,input().split(' ')))
i=0
while N>=K**i:
i=i+1
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,411 | 560,412 | u311176548 | python |
p02766 | n,k = map(int,input().split())
import math
q = math.log(n,k)
print(math.ceil(q)) | n,k = map(int,input().split())
import math
q = math.log(n,k)
print(math.floor(q+1)) | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 560,413 | 560,414 | u838786721 | python |
p02766 | N, K = map(int, input().split())
num_of_digits = 1
while N > K ** num_of_digits:
num_of_digits += 1
print(num_of_digits)
| N, K = map(int, input().split())
num_of_digits = 1
while N >= K ** num_of_digits:
num_of_digits += 1
print(num_of_digits)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,415 | 560,416 | u199830845 | python |
p02766 | N, K = map(int, input().split())
i = 1
while(N > K):
N = N / K
i += 1
print(i) | N, K = map(int, input().split())
i = 1
while(N >= K):
N = N / K
i += 1
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,417 | 560,418 | u370217787 | python |
p02766 | #coding:utf-8
n, k = map(int, input().split())
d = 0
while k ** d < n:
d += 1
print(d) | #coding:utf-8
n, k = map(int, input().split())
d = 0
while k ** d <= n:
d += 1
print(d) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,433 | 560,434 | u724563664 | python |
p02766 | 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))) | [
"call.arguments.add",
"call.arguments.change"
] | 560,448 | 560,449 | u686713618 | python |
p02766 | n,k = map(int,input().split())
ans = 0
for i in range(10**9):
if n >=2:
n = n//k
ans +=1
else:
break
print(ans+1) | n,k = map(int,input().split())
ans = 0
for i in range(10**9):
if n >=k:
n = n//k
ans +=1
else:
break
print(ans+1) | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 560,452 | 560,453 | u476124554 | python |
p02766 | n,k=map(int,input().split())
cnt=0
while n>k:
cnt += 1
n = n/k
print(cnt+1) | n,k=map(int,input().split())
cnt=0
while n>=k:
cnt += 1
n = n/k
print(cnt+1) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,467 | 560,468 | u951480280 | python |
p02766 | N,K = map(int,input().split())
cnt = 1
for i in range(N):
if N>K:
N /= K
cnt += 1
else:
break
print(cnt) | N,K = map(int,input().split())
cnt = 1
for i in range(N):
if N>=K:
N /= K
cnt += 1
else:
break
print(cnt) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,479 | 560,480 | u493555013 | python |
p02766 | N, K = map(int, input().split())
c = 0
while True:
if K**c<N:
c+=1
continue
else:
break
print(c) | N, K = map(int, input().split())
c = 0
while True:
if K**c<=N:
c+=1
continue
else:
break
print(c) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,483 | 560,484 | u054514819 | python |
p02766 | import math
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)) | [
"expression.operation.unary.arithmetic.remove",
"call.arguments.change",
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"io.output.change"
] | 560,487 | 560,488 | u103208639 | python |
p02766 | from math import log, ceil, floor
N, K = [int(n) for n in input().split()]
print(ceil(log(N,K))) | from math import log, ceil, floor
N, K = [int(n) for n in input().split()]
print(floor(log(N,K))+1) | [
"misc.opposites",
"identifier.change",
"call.function.change",
"call.arguments.change",
"io.output.change"
] | 560,497 | 560,498 | u974620347 | python |
p02766 | N, K = map(int, input().split())
ans = 0
while N > 1:
N /= K
ans += 1
print(ans) | N, K = map(int, input().split())
ans = 0
while N >= 1:
N /= K
ans += 1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,499 | 560,500 | u894934980 | python |
p02766 | # スペース区切りの整数の入力
n, k = map(int, input().split())
ans=0
while k**ans<n:
ans=ans+1
print(ans) | # スペース区切りの整数の入力
n, k = map(int, input().split())
ans=0
while k**ans<=n:
ans=ans+1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,503 | 560,504 | u089711240 | python |
p02766 | N, K = map(int, input().split())
ans = 0
while True:
N /= K
ans += 1
if(N <= 1):
break
print(ans)
| N, K = map(int, input().split())
ans = 0
while True:
N /= K
ans += 1
if(N < 1):
break
print(ans)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,505 | 560,506 | u994910167 | python |
p02766 | import sys
from io import StringIO
import unittest
def resolve():
n,k = list(map(int,input().split()))
c=1
s=k
while 1:
if s>=n:
print(c)
return
s*=k
c+=1
return
resolve() | import sys
from io import StringIO
import unittest
def resolve():
n,k = list(map(int,input().split()))
c=1
s=k
while 1:
if s>n:
print(c)
return
s*=k
c+=1
return
resolve() | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,509 | 560,510 | u697696097 | python |
p02766 | N,K = map(int,input().split())
power = 0
while(True):
if K**power >= N:
break
power += 1
print(power) | N,K = map(int,input().split())
power = 0
while(True):
if K**power > N:
break
power += 1
print(power) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,511 | 560,512 | u821869821 | python |
p02766 | N,K=map(int, input().split())
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
print(Base_10_to_n(N,K))
| N,K=map(int, input().split())
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
print(len(Base_10_to_n(N,K)))
| [
"call.arguments.add",
"call.arguments.change"
] | 560,522 | 560,523 | u935151656 | python |
p02766 | def main():
n, k = map(int,input().split())
ret = 1
while k**ret < n:
ret += 1
print(ret)
if __name__ == "__main__":
main() | def main():
n, k = map(int,input().split())
ret = 1
while k**ret <= n:
ret += 1
print(ret)
if __name__ == "__main__":
main() | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,528 | 560,529 | u383416302 | python |
p02766 | n, k = map(int, input().split())
ans = 1
while n > k:
n = n / k
ans += 1
print(ans)
| n, k = map(int, input().split())
ans = 1
while n >= k:
n = n / k
ans += 1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,530 | 560,531 | u684906944 | python |
p02766 | import math
N, K = map(int, input().split())
print(int(math.ceil(math.log(N,K)))) | import math
N, K = map(int, input().split())
print(int(math.floor(math.log(N,K)))+1) | [
"misc.opposites",
"identifier.change",
"call.arguments.change"
] | 560,532 | 560,533 | u909375661 | python |
p02766 | 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))) | 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))) | [
"expression.operation.binary.add"
] | 560,537 | 560,538 | u595289165 | python |
p02766 | 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))) | [
"expression.operation.binary.add"
] | 560,539 | 560,538 | u595289165 | python |
p02766 | N, K = list(map(int, input().split()))
t = 1
x = K
while K ** t < N:
x = x * t
t += 1
print(t) | N, K = list(map(int, input().split()))
t = 1
x = K
while K ** t <= N:
x = x * t
t += 1
print(t) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,552 | 560,553 | u002459665 | python |
p02766 | n,k=map(int,input().split())
cnt=0
while n>0:
n=n/k
cnt+=1
print(cnt) | n,k=map(int,input().split())
cnt=0
while n>0:
n=n//k
cnt+=1
print(cnt) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 560,561 | 560,562 | u371409687 | python |
p02766 | n,k=map(int,input().split())
cnt=0
while n>1:
n=n/k
cnt+=1
print(cnt) | n,k=map(int,input().split())
cnt=0
while n>0:
n=n//k
cnt+=1
print(cnt) | [
"literal.number.integer.change",
"control_flow.loop.condition.change",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 560,563 | 560,562 | u371409687 | python |
p02766 | n, k = map(int, input().split())
res = 0
while n > k:
res += 1
n //= k
print(res+1) | n, k = map(int, input().split())
res = 0
while n >= k:
res += 1
n //= k
print(res+1)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,573 | 560,574 | u469936642 | python |
p02766 | import sys
input = lambda: sys.stdin.readline().rstrip()
import math
def resolve():
N, K = map(int, input().split())
print(math.ceil(math.log(N, K)))
if __name__ == '__main__':
resolve()
| import sys
input = lambda: sys.stdin.readline().rstrip()
import math
def resolve():
N, K = map(int, input().split())
print(math.floor(math.log(N, K))+1)
if __name__ == '__main__':
resolve() | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 560,581 | 560,580 | u648881683 | python |
p02766 | N,K=map(int,input().split())
ans=0
while N>0:
N//M
ans+=1
print(ans) | N,K=map(int,input().split())
ans=0
while N>0:
N=N//K
ans+=1
print(ans) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 560,582 | 560,583 | u992910889 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(1,100))+1) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(100))) | [
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.binary.remove"
] | 560,598 | 560,599 | u941438707 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(100))+k>=n) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(100))) | [
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 560,600 | 560,599 | u941438707 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(1000))) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(100))) | [
"expression.operator.compare.change",
"call.arguments.change",
"io.output.change",
"literal.number.integer.change",
"control_flow.loop.range.bounds.upper.change"
] | 560,601 | 560,599 | u941438707 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(100))) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(100))) | [
"expression.operator.compare.change",
"call.arguments.change",
"io.output.change"
] | 560,602 | 560,599 | u941438707 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(1,100))+1) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(1,100))+1) | [
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 560,598 | 560,603 | u941438707 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(1000))) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(1,100))+1) | [
"expression.operator.compare.change",
"call.arguments.change",
"io.output.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 560,601 | 560,603 | u941438707 | python |
p02766 | n,k=map(int,input().split());print(sum(n>k**i for i in range(100))) | n,k=map(int,input().split());print(sum(n>=k**i for i in range(1,100))+1) | [
"expression.operator.compare.change",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 560,602 | 560,603 | u941438707 | python |
p02766 | n, k = map(int, input().split())
i = k
y = 1
while n > i:
y += 1
i *= k
print(y) | n, k = map(int, input().split())
i = k
y = 1
while n >= i:
y += 1
i *= k
print(y)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,604 | 560,605 | u660245210 | python |
p02766 | N, K = map(int, input().split())
d = 1
C = K
while N > C:
d += 1
C *= K
print(d) | N, K = map(int, input().split())
d = 1
C = K
while N >= C:
d += 1
C *= K
print(d) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,606 | 560,607 | u148425972 | python |
p02766 | [N,K] = list(map(int,input().split()))
if N<=K:
print(1)
else:
i=N
j=0
while i>K:
i = i/K
j=j+1
print(j+1) | [N,K] = list(map(int,input().split()))
if N<K:
print(1)
else:
i=N
j=0
while i>=K:
i = i/K
j=j+1
print(j+1) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.condition.change"
] | 560,608 | 560,609 | u017603316 | python |
p02766 | [N,K] = list(map(int,input().split()))
if N<K:
print(1)
else:
i=N
j=0
while i>K:
i = i/K
j=j+1
print(j+1) | [N,K] = list(map(int,input().split()))
if N<K:
print(1)
else:
i=N
j=0
while i>=K:
i = i/K
j=j+1
print(j+1) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,610 | 560,609 | u017603316 | python |
p02766 | N, K = map(int,input().split())
i = 1
P = K
while P < N:
i = i + 1
P = P * K
else:
print(i) | N, K = map(int,input().split())
i = 1
P = K
while P <= N:
i = i + 1
P = P * K
else:
print(i)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,624 | 560,625 | u203694953 | python |
p02766 | n,k = map(int,input().split())
e = 0
for i in range (1000):
if (n / (k ** (i+1))) > 1:
e = e + 1
else:
e = e
f = e + 1
print (f)
| n,k = map(int,input().split())
e = 0
for i in range (1000):
if (n / (k ** (i+1))) >= 1:
e = e + 1
else:
e = e
f = e + 1
print (f)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,628 | 560,629 | u432518223 | python |
p02766 | import math
N,K = list(map(int,input().split()))
print(math.ceil(math.log(N,K)+1)) | import math
N,K = list(map(int,input().split()))
print(int(math.log(N,K)+1)) | [
"call.arguments.change",
"io.output.change"
] | 560,630 | 560,631 | u096294926 | python |
p02766 | n,k = map(int,input().split())
for i in range(10**10):
if k**i >= n :
ans = i
break
print(ans) | n,k = map(int,input().split())
for i in range(10**10):
if k**i > n :
ans = i
break
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,637 | 560,638 | u167205647 | python |
p02766 | n,k = map(int,input().split())
for i in range(10**10):
if i**k >= n :
ans = i
break
print(ans) | n,k = map(int,input().split())
for i in range(10**10):
if k**i > n :
ans = i
break
print(ans) | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 560,639 | 560,638 | u167205647 | python |
p02766 | import sys
N,K = map(int,input().split())
K0 = K
if N < K:
print(0)
sys.exit()
count = 1
while N>=K:
K=K*K0
count += 1
print(count) | import sys
N,K = map(int,input().split())
K0 = K
if N < K:
print(1)
sys.exit()
count = 1
while N>=K:
K=K*K0
count += 1
print(count) | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 560,645 | 560,646 | u888721916 | python |
p02766 | n, k = map(int, input().split())
ans = 0
while n: # 一番下の桁を削る
ans += 1
n /= k
print(ans) | n, k = map(int, input().split())
ans = 0
while n: # 一番下の桁を削る
ans += 1
n //= k
print(ans) | [
"expression.operator.change"
] | 560,664 | 560,665 | u874644572 | python |
p02766 | n, k = map(int, input().split())
i = 1
while k ** i < n:
i += 1
print(i) | n, k = map(int, input().split())
i = 1
while k ** i <= n:
i += 1
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,674 | 560,675 | u962309487 | python |
p02766 | n, k = map(int, input().split())
i = 1
while k ** i < n:
i += 1
print(i+1) | n, k = map(int, input().split())
i = 1
while k ** i <= n:
i += 1
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"expression.operation.binary.remove"
] | 560,676 | 560,675 | u962309487 | python |
p02766 | strings = input().split(' ')
N = int(strings[0])
K = int(strings[1])
ans = 1
max = 1
while max < N:
max = max * K
ans =ans + 1
print(ans) | strings = input().split(' ')
N = int(strings[0])
K = int(strings[1])
ans = 1
max = K
while max <= N:
max = max * K
ans =ans + 1
print(ans) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,688 | 560,689 | u007931962 | python |
p02766 | strings = input().split(' ')
N = int(strings[0])
K = int(strings[1])
ans = 0
max = 1
while max < N:
max = max * K
ans =ans + 1
print(ans) | strings = input().split(' ')
N = int(strings[0])
K = int(strings[1])
ans = 1
max = K
while max <= N:
max = max * K
ans =ans + 1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,690 | 560,689 | u007931962 | python |
p02766 | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
fro... | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
fro... | [
"control_flow.loop.condition.change"
] | 560,691 | 560,692 | u499381410 | python |
p02766 | 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)) | [
"call.arguments.add",
"call.arguments.change"
] | 560,705 | 560,706 | u547608423 | python |
p02766 | 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)) | 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)) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,707 | 560,706 | u547608423 | python |
p02766 | n,k=map(int,input().split())
ans=1
f=0
while ans < n-1:
ans*=k
f+=1
print(f) | n,k=map(int,input().split())
ans=1
f=0
while ans < n+1:
ans*=k
f+=1
print(f) | [
"misc.opposites",
"expression.operator.arithmetic.change",
"control_flow.loop.condition.change"
] | 560,708 | 560,709 | u497326082 | python |
p02766 | n,k=map(int,input().split())
ans=1
f=0
while ans < n:
ans*=k
f+=1
print(f) | n,k=map(int,input().split())
ans=1
f=0
while ans < n+1:
ans*=k
f+=1
print(f) | [
"control_flow.loop.condition.change"
] | 560,710 | 560,709 | u497326082 | python |
p02766 | n,k = map(int,input().split())
r = 1
for i in range(1,n):
r*=k
if r>n:
print(i)
exit() | n,k = map(int,input().split())
r = 1
for i in range(1,100):
r*=k
if r>n:
print(i)
exit() | [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 560,719 | 560,720 | u693953100 | python |
p02766 | n, k = list(map(int, input().split()))
for i in range(1000000):
if pow(k, i) >= n:
print(i)
break
| n, k = list(map(int, input().split()))
for i in range(1000000):
if pow(k, i) - 1 >= n:
print(i)
break
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 560,729 | 560,730 | u639340617 | python |
p02766 | n, k = list(map(int, input().split()))
for i in range(1000):
if pow(k, i) >= n:
print(i)
break
| n, k = list(map(int, input().split()))
for i in range(1000000):
if pow(k, i) - 1 >= n:
print(i)
break
| [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 560,731 | 560,730 | u639340617 | python |
p02766 | N, K = [int(n) for n in input().rstrip().split(' ')]
ans = 0
while N<1:
N = N // K
ans += 1
print(ans) | N, K = [int(n) for n in input().rstrip().split(' ')]
ans = 0
while N>=1:
N = N // K
ans += 1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,734 | 560,735 | u966311314 | python |
p02766 | N, K = map(int, input().split())
exp = 1
while True:
if N <= K ** exp:
print(exp)
exit()
exp += 1
| N, K = map(int, input().split())
exp = 1
while True:
if N < K ** exp:
print(exp)
exit()
exp += 1
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,740 | 560,741 | u451012573 | python |
p02766 | x,k = map(int,input().split())
import math
print(math.ceil(math.log(x,k))) | x,k = map(int,input().split())
import math
print(1+int(math.log(x,k)))
| [] | 560,748 | 560,749 | u115110170 | python |
p02766 | # coding: utf-8
def solve(*args: str) -> str:
n, k = map(int, args[0].split())
ret = 1
while 1 < n/(k**ret):
ret += 1
return str(ret)
if __name__ == "__main__":
print(solve(*(open(0).read().splitlines())))
| # coding: utf-8
def solve(*args: str) -> str:
n, k = map(int, args[0].split())
ret = 1
while 1 <= n/(k**ret):
ret += 1
return str(ret)
if __name__ == "__main__":
print(solve(*(open(0).read().splitlines())))
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,756 | 560,757 | u164727245 | python |
p02766 | # coding: utf-8
def solve(*args: str) -> str:
n, k = map(int, args[0].split())
ret = 0
while 1 < n/(k**ret):
ret += 1
return str(ret)
if __name__ == "__main__":
print(solve(*(open(0).read().splitlines())))
| # coding: utf-8
def solve(*args: str) -> str:
n, k = map(int, args[0].split())
ret = 1
while 1 <= n/(k**ret):
ret += 1
return str(ret)
if __name__ == "__main__":
print(solve(*(open(0).read().splitlines())))
| [
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,758 | 560,757 | u164727245 | python |
p02766 | n, k = map(int, input().split())
i = 1
for i in range(1, 10**9+7):
if n <= k**i:
break
print(i) | n, k = map(int, input().split())
for i in range(1, 10**9+7):
if n < k**i:
break
print(i) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,765 | 560,766 | u700805562 | python |
p02766 | # -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permut... | # -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permut... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,769 | 560,770 | u334712262 | python |
p02766 | n, k = map(int, input().split())
cnt = 0
while n > 1:
n = n/k
cnt += 1
print(cnt) | n, k = map(int, input().split())
cnt = 0
while n >= 1:
n = n/k
cnt += 1
print(cnt) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,773 | 560,774 | u054559808 | python |
p02766 | n, k = map(int, input().split())
for i in range(100):
if k ** i >= n:
print(i)
break
| n, k = map(int, input().split())
for i in range(100):
if k ** i > n:
print(i)
break
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,795 | 560,796 | u328364772 | python |
p02766 | 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(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)) ) | [
"call.add",
"call.arguments.change"
] | 560,801 | 560,802 | u776557412 | python |
p02766 | 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)) ) | [
"call.arguments.add"
] | 560,803 | 560,802 | u776557412 | python |
p02766 | import math
n, k = map(int,input().split())
x = math.ceil(math.log(n, k))
print(x) | import math
n, k = map(int,input().split())
x = math.floor(math.log(n, k)+1)
print(x) | [
"misc.opposites",
"assignment.value.change",
"identifier.change"
] | 560,813 | 560,814 | u816637025 | python |
p02766 | i= list(map(int, input().split()))
j=1
while i[0]>i[1]**j:
j+=1
print(j) | i= list(map(int, input().split()))
j=1
while i[0]>=i[1]**j:
j+=1
print(j) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,815 | 560,816 | u185405877 | python |
p02766 | n,k=map(int,input().split())
i = 0
while k**i < n:
i+=1
print(i if i !=0 else 1) | n,k=map(int,input().split())
i = 0
while k**i <= n:
i+=1
print(i if i !=0 else 1) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,818 | 560,819 | u879478232 | python |
p02766 | N, K = list(map(int, input().split()))
i = 1
while K**i < N:
i += 1
print(i) | N, K = list(map(int, input().split()))
i = 1
while K**i <= N:
i += 1
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,834 | 560,835 | u633255271 | python |
p02766 | def main(n,k):
res = 0
val = 1
while val < n :
res += 1
val = val * k
return res
n,k = map(int, input().split())
print(main(n,k)) | def main(n,k):
res = 0
val = 1
while val <= n :
res += 1
val = val * k
return res
n,k = map(int, input().split())
print(main(n,k)) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,836 | 560,837 | u358957649 | python |
p02766 | N, K=map(int, input().split())
ans=1
count=0
now=1
while N>now:
now*=K
count+=1
print(count) | N, K=map(int, input().split())
count=0
now=1
while N>=now:
now*=K
count+=1
print(count) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,838 | 560,839 | u784022244 | python |
p02766 | N,K = map(int,input().split())
ans = ""
while True:
r = str(N % K)
ans += r
N = N // K
if N < K:
ans += str(N % K)
ans = ans[::-1]
if ans[0] == "0":
ans = ans[1:]
break
print(len(ans)) | N,K = map(int,input().split())
ans = ""
while True:
r = str(N % K)
ans += r
N = N // K
if N < K:
ans += str(N % K)
break
ans = ans[::-1]
if ans[0] == "0":
ans = ans[1:]
print(len(ans)) | [
"control_flow.break.add",
"control_flow.break.remove"
] | 560,852 | 560,853 | u993435350 | python |
p02766 | N,K = map(int, input().split())
i = 0
while K**i < N:
i+=1
else:
print(i) | N,K = map(int, input().split())
i = 1
while K**i <= N:
i+=1
else:
print(i) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,865 | 560,864 | u200527996 | python |
p02766 | N,K = map(int, input().split())
i = 1
while K**i < N:
i+=1
else:
print(i) | N,K = map(int, input().split())
i = 1
while K**i <= N:
i+=1
else:
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,866 | 560,864 | u200527996 | python |
p02766 | n,k=map(int,input().split())
c=1
ka=k
while n>ka:
ka*=k
c+=1
#print(ka)
print(c) | n,k=map(int,input().split())
c=1
ka=k
while n>=ka:
ka*=k
c+=1
#print(ka)
print(c) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,879 | 560,880 | u375695365 | python |
p02766 | N,K = map(int,input().split())
ans = 0
while N > K**ans:
ans += 1
print(ans)
| N,K = map(int,input().split())
ans = 0
while N > K**ans - 1:
ans += 1
print(ans)
| [
"control_flow.loop.condition.change"
] | 560,881 | 560,882 | u815879390 | python |
p02766 | 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) | [
"expression.operation.binary.remove"
] | 560,883 | 560,884 | u702515431 | python |
p02766 | N, K = map(int, input().split())
ans = 1
while True:
if K ** ans >= N :
break
ans += 1
print(ans)
| N, K = map(int, input().split())
ans = 1
while True:
if K ** ans > N :
break
ans += 1
print(ans)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,887 | 560,888 | u151107315 | python |
p02766 | import numpy as np
n,k= map(float,input().split())
dig = int(np.ceil(np.log(n)/np.log(k)))
if k**(dig-1) == n:
dig = dig - 1
print(dig) | import numpy as np
n,k= map(int,input().split())
dig = int(np.ceil(np.log(n)/np.log(k)))
if k**(dig) == n:
dig = dig + 1
print(dig) | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 560,892 | 560,893 | u637138924 | python |
p02766 | N, K = [int(i) for i in input().split()]
print(int(math.floor(math.log(float(N)/math.pow(K,2), K))) + 1 + 2) | import math
N, K = [int(i) for i in input().split()]
print(int(math.floor(math.log(float(N)/math.pow(K,2), K))) + 1 + 2) | [] | 560,896 | 560,897 | u486463852 | python |
p02766 | X,Y = map(int,input().split())
n=1
for i in range(1000):
n=n*Y
if(n>=X):
print(i+1)
exit() | X,Y = map(int,input().split())
n=1
for i in range(1000):
n=n*Y
if(n>X):
print(i+1)
exit() | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,902 | 560,903 | u311636831 | python |
p02766 | a, b = input().split()
c = int(a)
d = int(b)
flag = True
ans = 1
while flag:
if d ** ans >= c:
flag = False
break
else:
ans += 1
print(str(ans))
| a, b = input().split()
c = int(a)
d = int(b)
flag = True
ans = 1
while flag:
if d ** ans > c:
flag = False
break
else:
ans += 1
print(str(ans)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,909 | 560,910 | u902361509 | python |
p02766 | n,k=map(int,input().split())
i=1
while True:
if n<(k**(i-1)):
print(i)
break
else:
i=i+1 | n,k=map(int,input().split())
i=1
while True:
if n<(k**(i-1)):
print(i-1)
break
else:
i=i+1 | [
"expression.operation.binary.add"
] | 560,928 | 560,929 | u239653493 | python |
p02766 | N, K = map(int, input().split())
i = 0
while K**i < N: i += 1
print(i) | N, K = map(int, input().split())
i = 0
while K**i - 1 < N: i += 1
print(i) | [
"control_flow.loop.condition.change"
] | 560,934 | 560,935 | u760391419 | python |
p02766 | #ABC156 B - Digits
n,k = map(int,input().split(' '))
for i in range(n):
if(n < k**i):
print(i)
break
| #ABC156 B - Digits
n,k = map(int,input().split(' '))
for i in range(10**9):
if(n < k**i):
print(i)
break
| [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 560,938 | 560,939 | u308919961 | python |
p02766 | inp = input().split(" ")
n, k = int(inp[0]), int(inp[1])
# print(n, k)
squared = 1
count = 0
while squared < n:
squared *= k
# print(squared)
count += 1
print(count) | inp = input().split(" ")
n, k = int(inp[0]), int(inp[1])
# print(n, k)
squared = 1
count = 0
while squared <= n:
squared *= k
# print(squared)
count += 1
print(count) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,946 | 560,947 | u468313559 | python |
p02766 | n, k = map(int, input().split())
num = k
keta = 1
while n > num:
num = num * k
keta = keta + 1
print(keta)
| n, k = map(int, input().split())
num = k
keta = 1
while n >= num:
num = num * k
keta = keta + 1
print(keta)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,948 | 560,949 | u440149745 | python |
p02766 | a,b=input().split()
a=int(a)
b=int(b)
c=b
i=1
while a>c:
c=c*b
i+=1
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)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,952 | 560,953 | u771538568 | python |
p02766 | import math
inputs = [int(i) for i in input().split(" ")]
print(math.ceil(math.log(inputs[0], inputs[1])))
| import math
inputs = [int(i) for i in input().split(" ")]
print(math.floor(math.log(inputs[0], inputs[1]))+1)
| [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 560,958 | 560,959 | u657065743 | python |
p02766 | N, K = map(int, input().split())
i = 0
while N > K ** i:
i += 1
if i == 0:
print(1)
exit()
print(i) | N, K = map(int, input().split())
i = 0
while N >= K ** i:
i += 1
if i == 0:
print(1)
exit()
print(i) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,960 | 560,961 | u728120584 | python |
p02766 | n, k = map(int, input().split())
i = 0
l = k ** i
if n <= k:
print(1)
exit(0)
while l < n:
l = k ** i
# print(l)
i += 1
print(i - 1)
| n, k = map(int, input().split())
i = 0
l = k ** i
if n <= k:
print(1)
exit(0)
while l <= n:
l = k ** i
# print(l)
i += 1
print(i - 1)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 560,962 | 560,963 | u002539468 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.