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 9
values |
|---|---|---|---|---|---|---|---|
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 |
p02766 | n, k = map(int, input().split())
x = 1
while n >= k*(k**x):
x += 1
print(x+1) | n, k = map(int, input().split())
x = 1
while n >= k**x:
x += 1
print(x) | [
"expression.operation.binary.remove",
"control_flow.loop.condition.change"
] | 560,964 | 560,965 | u640123177 | python |
p02766 | #!/usr/bin/env python3
import sys
def solve(N: int, K: int):
i = 0
while True:
if N > (K ** i):
i += 1
else:
print(i)
break
def main():
def iterate_tokens():
for line in sys.stdin:
for word in line.split():
yield word
... | #!/usr/bin/env python3
import sys
def solve(N: int, K: int):
i = 0
while True:
if N >= (K ** i):
i += 1
else:
print(i)
break
def main():
def iterate_tokens():
for line in sys.stdin:
for word in line.split():
yield word... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,974 | 560,975 | u505505186 | python |
p02766 | N,K = map(int,input().split(" "))
i=0
while(True):
if(K**i<N):
i+=1
continue
else:
print(i)
break | N,K = map(int,input().split(" "))
i=0
while(True):
if(K**i<=N):
i+=1
continue
else:
print(i)
break | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 560,986 | 560,987 | u382407432 | python |
p02766 | n,k=map(int,input().split())
for i in range(1,19):
if n//pow(k,i)<=0:
print(i)
break
| n,k=map(int,input().split())
for i in range(1,100):
if n//pow(k,i)<=0:
print(i)
break
| [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 560,992 | 560,993 | u553070631 | python |
p02766 | N,K = map(int,input().split())
keta = 1
while N > K**keta:
keta += 1
print(keta) | N,K = map(int,input().split())
keta = 1
while N >= K**keta:
keta += 1
print(keta) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,003 | 561,004 | u386782537 | python |
p02766 | N,K = map(int,input().split())
keta = 0
while N > K**keta:
keta += 1
print(keta)
| N,K = map(int,input().split())
keta = 1
while N >= K**keta:
keta += 1
print(keta) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,005 | 561,004 | u386782537 | python |
p02766 | import math
N,K=map(int,input().split())
x=math.log(N,K)
if x.is_integer():
print(int(x))
else:
print(int(x)+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) | [
"expression.operation.binary.add"
] | 561,010 | 561,011 | u521602455 | python |
p02766 | N, K = map(int, input().split())
t = 0
while(K**t < N):
#print(K**t)
t+=1
print(t) | N, K = map(int, input().split())
t = 0
while(K**t <= N):
#print(K**t)
t+=1
print(t) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,012 | 561,013 | u052821962 | python |
p02766 | # coding:utf-8
import sys
import math
import time
#import numpy as np
import collections
from collections import deque
import queue
import copy
#X = str(input()).split()
#a = [int(x) for x in input().split()]
NK = str(input()).split()
N = int(NK[0])
K = int(NK[1])
ans = 1
for i in range(N):
if(N<=K**i):
ans... | # coding:utf-8
import sys
import math
import time
#import numpy as np
import collections
from collections import deque
import queue
import copy
#X = str(input()).split()
#a = [int(x) for x in input().split()]
NK = str(input()).split()
N = int(NK[0])
K = int(NK[1])
ans = 1
for i in range(N):
if(N<K**i):
ans ... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,018 | 561,019 | u395117343 | python |
p02766 | def resolve():
n, k = map(int, input().split())
cnt = 1
while n > k:
n = n / k
cnt += 1
print(cnt)
if __name__ == "__main__":
resolve() | def resolve():
n, k = map(int, input().split())
cnt = 1
while n >= k:
n = n / k
cnt += 1
print(cnt)
if __name__ == "__main__":
resolve() | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,020 | 561,021 | u824144553 | python |
p02766 |
N,K=map(int,input().split()) # 1行2列
count = 0
while N > 1:
N = N / K
count += 1
print(count)
| N,K=map(int,input().split()) # 1行2列
count = 0
while N >= 1:
N = N / K
count += 1
print(count)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,024 | 561,025 | u150112687 | python |
p02766 | import math
import itertools
import statistics
#n = int(input())
#n, d = list(input().split())
n, k = list(map(int, input().split()))
p = 1
keta = 1
while p < n:
p *= k
keta+=1
print(keta-1) | import math
import itertools
import statistics
#n = int(input())
#n, d = list(input().split())
n, k = list(map(int, input().split()))
p = 1
keta = 1
while p <= n:
p *= k
keta+=1
print(keta-1) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,026 | 561,027 | u696444274 | python |
p02766 | N,K = map(int,input().split())
cnt = 1
tmp = K
while tmp < N:
tmp *= K
cnt+=1
print(cnt) | N,K = map(int,input().split())
cnt = 1
tmp = K
while tmp <= N:
tmp *= K
cnt+=1
print(cnt) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,040 | 561,041 | u181668771 | python |
p02766 | n,k= map(int,input().split())
ans = 0
while n > 1:
n = n/k
ans +=1
print(ans)
| n,k= map(int,input().split())
ans = 0
while n >= 1:
n = n//k
ans +=1
print(ans)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 561,054 | 561,055 | u432853936 | python |
p02766 | n, k = map(int, input().split())
dig = 0
while True:
if n > pow(k,dig):
dig += 1
else:
break
print(dig) | n, k = map(int, input().split())
dig = 0
while True:
if n >= pow(k,dig):
dig += 1
else:
break
print(dig) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,062 | 561,063 | u762275701 | python |
p02766 | import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()
def main():
N,K=map(int,input().split())
ans=0
a=1
while N>a:
a*=K
ans+=1
print(ans)
if __name__ == '__main__':
main()
| import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()
def main():
N,K=map(int,input().split())
ans=0
a=1
N+=1
while N>a:
a*=K
ans+=1
print(ans)
if __name__ == '__main__':
main()
| [] | 561,071 | 561,072 | u714642969 | python |
p02766 | n,k=map(int,input().split())
a=1
c=0
while a<n:
a*=k
c+=1
print(c)
| n,k=map(int,input().split())
a=1
c=0
while a<=n:
a*=k
c+=1
print(c)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,077 | 561,078 | u608726540 | python |
p02766 | #n = int(input())
#l = list(map(int, input().split()))
'''
A=[]
B=[]
for i in range():
a, b = map(int, input().split())
A.append(a)
B.append(b)'''
l = list(map(int, input().split()))
cnt =1
while l[0]>l[1]:
l[0]/=l[1]
cnt +=1
print(cnt) | #n = int(input())
#l = list(map(int, input().split()))
'''
A=[]
B=[]
for i in range():
a, b = map(int, input().split())
A.append(a)
B.append(b)'''
l = list(map(int, input().split()))
cnt =1
while l[0]>=l[1]:
l[0]/=l[1]
cnt +=1
print(cnt) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,083 | 561,084 | u372102441 | python |
p02766 | n,k=[int(k) for k in input().strip().split(" ")]
res=0
while n:
n/=k
res+=1
print(res) | n,k=[int(k) for k in input().strip().split(" ")]
res=0
while n:
n//=k
res+=1
print(res) | [
"expression.operator.change"
] | 561,085 | 561,086 | u067899663 | python |
p02766 | n,k = map(int,input().split())
ans = 0
now = 1
while now < n:
now *= k
ans += 1
print(ans) | n,k = map(int,input().split())
ans = 0
now = 1
while now <= n:
now *= k
ans += 1
print(ans)
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,087 | 561,088 | u667024514 | python |
p02766 | import math
N, K = input().split(" ")
print(math.ceil(math.log(int(N),int(K)))) | import math
N,K = input().split(" ")
print(math.floor(math.log(int(N),int(K))+1)) | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 561,110 | 561,111 | u567664824 | python |
p02766 | import math
N, K = input().split(" ")
print(math.ceil(math.log(int(N),int(K)))) | import math
N, K = input().split(" ")
print(math.floor(math.log(int(N),int(K))+1)) | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 561,110 | 561,112 | u567664824 | python |
p02766 | NK = input().split()
N = int(NK[0])
K = int(NK[1])
ans = 1
while True:
if N > K**ans:
ans += 1
else:
break
print(ans) | NK = input().split()
N = int(NK[0])
K = int(NK[1])
ans = 1
while True:
if N >= K**ans:
ans += 1
else:
break
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,113 | 561,114 | u330169562 | python |
p02766 | NK = input().split()
N = int(NK[0])
K = int(NK[1])
ans = 0
while True:
if N > K**ans:
ans += 1
else:
break
print(ans) | NK = input().split()
N = int(NK[0])
K = int(NK[1])
ans = 1
while True:
if N >= K**ans:
ans += 1
else:
break
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,115 | 561,114 | u330169562 | python |
p02766 | import math
n, k = map(int,input().split())
if float.is_integer(math.log(n, k)):
print(math.ceil(math.log(n, k))-1)
else:
print(math.ceil(math.log(n, k))) | import math
n, k = map(int,input().split())
if float.is_integer(math.log(n, k)):
print(math.ceil(math.log(n, k))+1)
else:
print(math.ceil(math.log(n, k)))
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 561,116 | 561,117 | u250207413 | python |
p02766 | n, k = map(int, input().split())
count = 1
while True:
if n / k >= 1:
n = int(n / k)
print(n)
count += 1
else:
break
print(count) | n, k = map(int, input().split())
count = 1
while True:
if n / k >= 1:
n = int(n / k)
count += 1
else:
break
print(count) | [
"call.remove"
] | 561,120 | 561,121 | u486286539 | python |
p02766 | N,K = map(int,input().split())
ans = 1
while True:
if K**ans >= N:
print(ans)
exit()
else:ans += 1 | N,K = map(int,input().split())
ans = 1
while True:
if K**ans-1>= N:
print(ans)
exit()
else:ans += 1 | [
"control_flow.branch.if.condition.change"
] | 561,137 | 561,138 | u503228842 | python |
p02766 | N,K = map(int,input().split())
ans = 0
while True:
if K**ans >= N:
print(ans)
exit()
else:ans += 1 | N,K = map(int,input().split())
ans = 1
while True:
if K**ans-1>= N:
print(ans)
exit()
else:ans += 1 | [
"literal.number.integer.change",
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 561,139 | 561,138 | u503228842 | python |
p02766 |
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) | [
"call.remove"
] | 561,144 | 561,145 | u650417650 | python |
p02766 | import math
N, K = input().split()
print(math.ceil(math.log(int(N), int(K)))) | import math
N, K = input().split()
print(math.floor(math.log(int(N), int(K)))+1) | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 561,146 | 561,147 | u140602852 | python |
p02766 | a, n = map(int, input().split())
cnt = 1
nn = n
while True:
cnt += 1
n *= nn
if a < n:
break
print(cnt) | a, n = map(int, input().split())
cnt = 0
nn = 1
while True:
cnt += 1
nn *= n
if a < nn:
break
print(cnt) | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 561,149 | 561,150 | u646244131 | python |
p02766 | input_arr = input().split(" ")
n = int(input_arr[0])
k = int(input_arr[1])
ans = ""
num = n
while(num > 0):
ans += str(num % k)
num //= k
print(ans)
print(len(ans)) | input_arr = input().split(" ")
n = int(input_arr[0])
k = int(input_arr[1])
ans = ""
num = n
while(num > 0):
ans += str(num % k)
num //= k
print(len(ans)) | [
"call.remove"
] | 561,151 | 561,152 | u981028199 | python |
p02766 | N, K = map(int, input().split())
for i in range(1, 10 ** 10):
if N <= K ** i:
print(i)
break
| N, K = map(int, input().split())
for i in range(1, 10 ** 10):
if N < (K ** i):
print(i)
break
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,153 | 561,154 | u483331319 | python |
p02766 | N, K = map(int, input().split())
for i in range(1, 10 ** 9):
if N <= K ** i:
print(i)
break
| N, K = map(int, input().split())
for i in range(1, 10 ** 10):
if N < (K ** i):
print(i)
break
| [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,155 | 561,154 | u483331319 | python |
p02766 | n, k = map(int, input().split())
cnt = 0
val = k
for i in range(n):
val *= k
cnt += 1
#print(k)
if val > n:
break
#print(cnt)
#print(i)
print(cnt+1) | n, k = map(int, input().split())
cnt = 0
val = k
for i in range(n):
if val > n:
break
val *= k
cnt += 1
#print(k)
#print(val)
if val > n:
break
#print(cnt)
#print(i)
#print(val)
print(cnt+1) | [
"control_flow.branch.if.add",
"control_flow.break.add"
] | 561,158 | 561,159 | u361381049 | python |
p02766 | a,b=map(int,input().split())
c=1
d=0
while 1:
if a-c<=0:
break
d+=1
c*=b
print(d) | a,b=map(int,input().split())
c=1
d=0
while 1:
if a-c<0:
break
d+=1
c*=b
print(d)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,162 | 561,163 | u223555291 | python |
p02766 | N, K = map(int, input().split())
x = 0
for j in range(1, 46):
if N > (K**j):
continue
else:
print(j)
break
| N, K = map(int, input().split())
x = 0
for j in range(1, 46):
if N >= (K**j):
continue
else:
print(j)
break
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,164 | 561,165 | u374517193 | python |
p02766 | import math
S, T=map(int, input().split())
ans=math.ceil(math.log(S, T))
print(ans) | import math
S, T=map(int, input().split())
ans=math.floor(math.log(S, T))+1
print(ans) | [
"misc.opposites",
"assignment.value.change",
"identifier.change"
] | 561,166 | 561,167 | u662062459 | 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):
ans += 1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,170 | 561,171 | u484139840 | python |
p02766 | n,sin=map(int,input().split(' '))
while n>=sin:
ls.append(n%sin)
n=n//sin
ls.append(n)
print(len(ls)) | n,sin=map(int,input().split(' '))
ls=[]
while n>=sin:
ls.append(n%sin)
n=n//sin
ls.append(n)
print(len(ls)) | [
"assignment.add"
] | 561,172 | 561,173 | u199845325 | python |
p02766 | import math
line=list(map(int,input().split()))
a=line[0]
b=line[1]
n=math.log(a,b)
print(math.ceil(n)) | import math
line=list(map(int,input().split()))
a=line[0]
b=line[1]
n=1+math.log(a,b)
print(math.floor(n))
| [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 561,177 | 561,178 | u931297616 | python |
p02766 | import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
mod = int(1e9+7)
INF = 1<<29
def main():
n,k = map(int,input().split())
ans = 1
while k ** ans < n - k:
ans += 1
print(ans)
return
if __name__=='__main__':
main()
| import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
mod = int(1e9+7)
INF = 1<<29
def main():
n,k = map(int,input().split())
ans = 1
while k ** ans <= n:
ans += 1
print(ans)
return
if __name__=='__main__':
main()
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"expression.operation.binary.remove"
] | 561,179 | 561,180 | u807028974 | python |
p02766 | 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)
x10 = X
x2 = Base_10_to_n(x10, 2)
print(len(x2)) | 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)
x10 = X
x2 = Base_10_to_n(x10, n)
print(len(x2)) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 561,183 | 561,184 | u257084573 | python |
p02766 | x = input().split()
N = int(x[0])
K = int(x[1])
if N ==1:
print(1)
else:
d = 0
while K ** d < N:
d +=1
print(d) | x = input().split()
N = int(x[0])
K = int(x[1])
if N ==1:
print(1)
else:
d = 0
while K ** d <= N:
d +=1
print(d) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,189 | 561,190 | u229429359 | python |
p02766 | N, K = map(int, input().split())
a = N
i = 0
while a > 0:
a = N - K ** i
i += 1
print(i-1) | N, K = map(int, input().split())
a = N
i = 0
while a >= 0:
a = N - K ** i
i += 1
print(i-1) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,204 | 561,205 | u745812846 | python |
p02766 | def main():
N, K = map(int, input().split(' '))
i = 0
while True:
if N > pow(K,i):
i += 1
else:
break
print(i)
if __name__ == '__main__':
main() | def main():
N, K = map(int, input().split(' '))
i = 0
while True:
if N >= pow(K,i):
i += 1
else:
break
print(i)
if __name__ == '__main__':
main() | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,206 | 561,207 | u801049006 | python |
p02766 | n, k = map(int, input().split())
for i in range(100):
if k**i >= n:
print(i)
exit() | n, k = map(int, input().split())
for i in range(1000):
if k**i > n:
print(i)
exit() | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,208 | 561,209 | u849029577 | python |
p02766 | N, K = map(int, input().split())
count = 1
while N > K**count:
count += 1
print(count) | N, K = map(int, input().split())
count = 1
while N >= K**count:
count += 1
print(count) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,223 | 561,224 | u164873417 | python |
p02766 | N, K = map(int, input().split())
count = 0
while N > K**count:
count += 1
print(count) | N, K = map(int, input().split())
count = 1
while N >= K**count:
count += 1
print(count) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 561,225 | 561,224 | u164873417 | python |
p02766 | n, k = list(map(int,input().split(" ")))
d=1
while(n>k):
d+=1
n= n//k
print(d) | n, k = list(map(int,input().split(" ")))
d=0
while(n):
d+=1
n= n//k
print(d) | [
"literal.number.integer.change",
"assignment.value.change"
] | 561,236 | 561,237 | u915879510 | python |
p02766 | n, k = map(int, input().split())
ans = 0
for i in range(1, n+1):
if n <= k**i:
ans = i
break
print(ans) | n, k = map(int, input().split())
ans = 0
for i in range(1, n+1):
if n < k**i:
ans = i
break
print(ans)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,240 | 561,241 | u225084815 | python |
p02766 | n, k = map(int, input().split(" "))
keta = 1
sum = 0
while True:
max = k**keta-1
if max > n:
print(keta)
break
keta += 1 | n, k = map(int, input().split(" "))
keta = 1
sum = 0
while True:
max = k**keta-1
if max >= n:
print(keta)
break
keta += 1 | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,248 | 561,249 | u068727970 | python |
p02766 | import math
N,K = map(int,input().split())
print(math.ceil(math.log(N,K))) | import math
N,K = map(int,input().split())
print(math.floor(math.log(N,K)+1)) | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 561,252 | 561,253 | u821775079 | python |
p02766 | 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.rstr... | 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... | [
"call.remove"
] | 561,254 | 561,255 | u659302753 | python |
p02766 | # ABC156 B
n, k = map(int, input().split())
for i in range(1, 10000000000000):
if k**i >= n:
print(i)
break | # ABC156 B
n, k = map(int, input().split())
for i in range(1, 10000000000000):
if k**i > n:
print(i)
break | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,260 | 561,261 | u998679483 | python |
p02766 | # ABC156 B
n, k = map(int, input().split())
for i in range(1, 100000000):
if k**i >= n:
print(i)
break | # ABC156 B
n, k = map(int, input().split())
for i in range(1, 10000000000000):
if k**i > n:
print(i)
break | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,262 | 561,261 | u998679483 | python |
p02766 | import math
N, K = map(int, input().split())
t = 1
x = N
n = 0
while (True):
n += 1
x -= t * (K - 1)
if x < 0:
break
t *= K
print(n)
| import math
N, K = map(int, input().split())
t = 1
x = N
n = 0
while (True):
n += 1
x -= t * (K - 1)
if x <= 0:
break
t *= K
print(n)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 561,263 | 561,264 | u652583512 | python |
p02766 | N, K = map(int,input().split())
n = N
ans = 0
while n>1:
n = n/K
ans+=1
print(ans)
| N, K = map(int,input().split())
n = N
# if n ==1:
# ans =1
# else:
# while n>1:
# n = n/K
# ans+=1
ans =1
while n>=K:
n = n//K
ans +=1
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 561,265 | 561,266 | u219015402 | python |
p02767 | N=int(input())
X=list(map(int,input().split()))
X.sort()
ans=10**1000
for p in range(X[0],X[-1]):
tmp=0
for x in X:
tmp+=(x-p)**2
ans=min(ans,tmp)
print(ans) | N=int(input())
X=list(map(int,input().split()))
X.sort()
ans=10**1000
for p in range(X[0],X[-1]+1):
tmp=0
for x in X:
tmp+=(x-p)**2
ans=min(ans,tmp)
print(ans) | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 561,279 | 561,280 | u130076114 | python |
p02767 | N=int(input())
X=list(map(int,input().split()))
X.sort()
ans=10**10
for p in range(X[0],X[-1]):
tmp=0
for x in X:
tmp+=(x-p)**2
ans=min(ans,tmp)
print(ans) | N=int(input())
X=list(map(int,input().split()))
X.sort()
ans=10**1000
for p in range(X[0],X[-1]+1):
tmp=0
for x in X:
tmp+=(x-p)**2
ans=min(ans,tmp)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 561,281 | 561,280 | u130076114 | python |
p02767 | input()
x=list(map(int,input().split()))
r=10**9
for i in range(min(x),max(x)):
s=0
for j in x:
s+=(i-j)**2
r=min(r,s)
print(r) | input()
x=list(map(int,input().split()))
r=10**10
for i in range(min(x),max(x)+1):
s=0
for j in x:
s+=(i-j)**2
r=min(r,s)
print(r) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 561,282 | 561,283 | u695644361 | python |
p02767 | N = int(input())
X = list(map(int, input().split()))
total = 0
m = round(sum(X) / N)
print(m)
for i in X:
total += (m - i) ** 2
print(total) | N = int(input())
X = list(map(int, input().split()))
total = 0
m = round(sum(X) / N)
for i in X:
total += (m - i) ** 2
print(total) | [
"call.remove"
] | 561,286 | 561,287 | u389188163 | python |
p02767 | N = int(input())
X = list(map(int, input().split()))
small = 10000000
temp = 0
p_max = max(X)
for p in range(1, p_max + 1):
for i in range(N):
temp += (X[i] - p)**2
if temp < small:
small = temp
print(small)
| N = int(input())
X = list(map(int, input().split()))
small = 10000000
temp = 0
p_max = max(X)
for p in range(1, p_max + 1):
for i in range(N):
temp += (X[i] - p)**2
if temp < small:
small = temp
temp = 0
print(small)
| [
"assignment.add"
] | 561,292 | 561,293 | u244466744 | python |
p02767 | n = int(input())
x = list(map(int, input().split()))
min_x = 100 * 100
for p in range(1, 100+1, 1):
total = 0
for xi in x:
total += (xi - p) ** 2
min_x = min([min_x, total])
print(min_x)
| n = int(input())
x = list(map(int, input().split()))
min_x = 100 * 100 * 100 + 1
for p in range(1, 100+1, 1):
total = 0
for xi in x:
total += (xi - p) ** 2
min_x = min([min_x, total])
print(min_x)
| [
"assignment.change"
] | 561,298 | 561,299 | u521919054 | python |
p02767 | N = int(input())
X_ls = list(map(int, input().split(' ')))
rst = -1
for i in range(min(X_ls), max(X_ls) + 1):
val = 0
for j in X_ls:
val += (i - j) ** 2
if rst == -1:
rst = val
else:
rst = min(rst, val)
print(val) | N = int(input())
X_ls = list(map(int, input().split(' ')))
rst = -1
for i in range(min(X_ls), max(X_ls) + 1):
val = 0
for j in X_ls:
val += (i - j) ** 2
if rst == -1:
rst = val
else:
rst = min(rst, val)
print(rst) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 561,302 | 561,303 | u418149936 | python |
p02767 | N = int(input())
X_ls = list(map(int, input().split(' ')))
rst = -1
for i in range(min(X_ls), max(X_ls)):
val = 0
for j in X_ls:
val += (i - j) ** 2
if rst == -1:
rst = val
else:
rst = min(rst, val)
print(rst) | N = int(input())
X_ls = list(map(int, input().split(' ')))
rst = -1
for i in range(min(X_ls), max(X_ls) + 1):
val = 0
for j in X_ls:
val += (i - j) ** 2
if rst == -1:
rst = val
else:
rst = min(rst, val)
print(rst) | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 561,304 | 561,303 | u418149936 | python |
p02767 | N = int(input())
X_ls = list(map(int, input().split(' ')))
rst = -1
for i in range(min(X_ls), max(X_ls)):
val = 0
for j in X_ls:
val += (i - j) ** 2
if rst == -1:
rst = val
else:
rst = min(rst, val)
print(rst) | N = int(input())
X_ls = list(map(int, input().split(' ')))
rst = -1
for i in range(min(X_ls), max(X_ls) + 1):
val = 0
for j in X_ls:
val += (i - j) ** 2
if rst == -1:
rst = val
else:
rst = min(rst, val)
print(rst) | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 561,304 | 561,307 | u418149936 | python |
p02767 | def stamina(x, p):
return (x - p) ** 2
def resolve():
N = int(input())
Xs = list(map(int, input().split()))
min_sum = 100 ** 2
for p in range(1, 101):
s_sum = 0
for p_x in Xs:
s_sum += stamina(p_x, p)
min_sum = min(min_sum, s_sum)
print(min_sum)
resolve() | def stamina(x, p):
return (x - p) ** 2
def resolve():
N = int(input())
Xs = list(map(int, input().split()))
min_sum = 10 ** 10
for p in range(1, 101):
s_sum = 0
for p_x in Xs:
s_sum += stamina(p_x, p)
min_sum = min(min_sum, s_sum)
print(min_sum)
resolve() | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 561,312 | 561,313 | u097319437 | python |
p02767 | n = int(input())
l = list(map(int, input().split()))
ans = 10000
for p in range(1,101):
d = 0
for x in l:
d += (x-p)**2
ans = min(d,ans)
print(ans) | n = int(input())
l = list(map(int, input().split()))
ans = 1000000
for p in range(1,101):
d = 0
for x in l:
d += (x-p)**2
ans = min(d,ans)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change"
] | 561,314 | 561,315 | u239091426 | python |
p02767 | import math
import queue
from collections import defaultdict
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
res.append(2)
for i in range(3,math.floor(n//... | import math
import queue
from collections import defaultdict
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
res.append(2)
for i in range(3,math.floor(n//... | [
"call.add"
] | 561,331 | 561,332 | u509739538 | python |
p02767 | n = input()
x = list(map(int,input().split()))
ans = sys.maxsize
# i = min(x)
# while i <= max(x):
for i in range(min(x),max(x)+1,1):
tmp = sum(map(lambda p: (p-i)**2,x))
if ans > tmp:
ans = tmp
# i += 1
print(ans) | import sys
n = input()
x = list(map(int,input().split()))
ans = sys.maxsize
# i = min(x)
# while i <= max(x):
for i in range(min(x),max(x)+1,1):
tmp = sum(map(lambda p: (p-i)**2,x))
if ans > tmp:
ans = tmp
# i += 1
print(ans) | [] | 561,333 | 561,334 | u555587832 | python |
p02767 | n = input()
x = list(map(int,input().split()))
ans = 10000
for i in range(min(x),max(x)+1,1):
tmp = sum(map(lambda p: (p-i)**2,x))
if ans > tmp:
ans = tmp
print(ans)
| import sys
n = input()
x = list(map(int,input().split()))
ans = sys.maxsize
# i = min(x)
# while i <= max(x):
for i in range(min(x),max(x)+1,1):
tmp = sum(map(lambda p: (p-i)**2,x))
if ans > tmp:
ans = tmp
# i += 1
print(ans) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 561,335 | 561,334 | u555587832 | python |
p02767 | n = int(input())
x = list(map(int,input().split()))
j = max(x)
m = 0
y = True
for p in range(n):
if x[0] != x[i]:
y = False
if y:
print(0)
exit(0)
for p in range(j):
c = 0
z = 0
for i in range(n):
z = x[i] - p
c = c + (z * z)
if m == 0:
m = c
else:... | n = int(input())
x = list(map(int,input().split()))
j = max(x)
m = 0
y = True
for i in range(n):
if x[0] != x[i]:
y = False
if y:
print(0)
exit(0)
for p in range(j):
c = 0
z = 0
for i in range(n):
z = x[i] - p
c = c + (z * z)
if m == 0:
m = c
else:... | [
"identifier.change"
] | 561,336 | 561,337 | u357751375 | python |
p02767 | N = int(input())
X = list(map(int,input().split()))
ans = []
for i in range(X[-1]):
P = i+1
sum = 0
for j in range(N):
sum += (X[j]-P)**2
ans.append(sum)
print(min(ans)) | N = int(input())
X = list(map(int,input().split()))
ans = []
for i in range(max(X)):
P = i+1
sum = 0
for j in range(N):
sum += (X[j]-P)**2
ans.append(sum)
print(min(ans)) | [
"call.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 561,340 | 561,341 | u077816564 | python |
p02767 | num = int(input())
pos = list(map(int,input().split()))
maxpos = max(pos)
minhealth = 1e9
count = 0
for i in range(maxpos):
for j in pos:
count += (j-i)**2
minhealth = min(minhealth, count)
count = 0
print(minhealth)
| num = int(input())
pos = list(map(int,input().split()))
maxpos = max(pos)
minhealth = 1e9
count = 0
for i in range(maxpos+1):
for j in pos:
count += (j-i)**2
minhealth = min(minhealth, count)
count = 0
print(minhealth)
| [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 561,342 | 561,343 | u453630968 | python |
p02767 | N = int(input())
nums = list(map(int, input().split()))
answer = 10**4
for p in range(1, 100):
power = 0
for j in range(N):
power += (p-nums[j])**2
answer = min(answer, power)
print(answer)
| N = int(input())
nums = list(map(int, input().split()))
answer = 10**8
for p in range(1, 100):
power = 0
for j in range(N):
power += (p-nums[j])**2
answer = min(answer, power)
print(answer) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 561,344 | 561,345 | u626337957 | python |
p02767 | N = int(input())
X = map(int, input().split())
ans = 10000000000
for i in range(100):
s = 0
for j in range(N):
s += (X[j]-i)**2
ans = min(ans, s)
print(ans) | N = int(input())
X = list(map(int, input().split()))
ans = 10000000000
for i in range(100):
s = 0
for j in range(N):
s += (X[j]-i)**2
ans = min(ans, s)
print(ans) | [
"call.add",
"call.arguments.change"
] | 561,362 | 561,363 | u309120194 | python |
p02767 | N = int(input())
X = map(int, input().split())
ans = 100000
for i in range(100):
s = 0
for j in range(N):
s += (X[j]-i)**2
ans = min(ans, s)
print(ans) | N = int(input())
X = list(map(int, input().split()))
ans = 10000000000
for i in range(100):
s = 0
for j in range(N):
s += (X[j]-i)**2
ans = min(ans, s)
print(ans) | [
"call.add",
"call.arguments.change",
"literal.number.integer.change",
"assignment.value.change"
] | 561,365 | 561,363 | u309120194 | python |
p02767 | N = int(input())
X = list(map(int, input().split()))
ans = 100000
for i in range(100):
s = 0
for j in range(N):
s += (X[i]-i)**2
ans = min(ans, s)
print(ans) | N = int(input())
X = list(map(int, input().split()))
ans = 10000000000
for i in range(100):
s = 0
for j in range(N):
s += (X[j]-i)**2
ans = min(ans, s)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 561,366 | 561,363 | u309120194 | python |
p02767 | import numpy as np
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(max(X)):
sum = np.sum(list(map(lambda x: (x-P)**2, X)))
ans = min(ans, sum)
print(ans) | import numpy as np
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(0, 101):
sum = np.sum(list(map(lambda x: (x-P)**2, X)))
ans = min(ans, sum)
print(ans) | [
"call.arguments.change"
] | 561,367 | 561,368 | u456579619 | python |
p02767 | # -*- coding:utf-8 -*-
n = int(input())
PosList = []
TempSum = 0
ReturnSum = 0
PosList = list(map(int,input().split()))
for pos in range(1,max(PosList)):
TempSum = 0
for nPos in range(n):
TempSum += (pos - PosList[nPos])**2
if pos == 1:
ReturnSum = TempSum
elif ReturnSum > TempSum:
... | # -*- coding:utf-8 -*-
n = int(input())
PosList = []
TempSum = 0
ReturnSum = 0
PosList = list(map(int,input().split()))
for pos in range(1,101):
TempSum = 0
for nPos in range(n):
TempSum += (pos - PosList[nPos])**2
if pos == 1:
ReturnSum = TempSum
elif ReturnSum > TempSum:
Re... | [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 561,369 | 561,370 | u253479302 | python |
p02767 | # -*- coding:utf-8 -*-
n = int(input())
PosList = []
TempSum = 0
ReturnSum = 0
PosList = list(map(int,input().split()))
for pos in range(max(PosList)):
TempSum = 0
for nPos in range(n):
TempSum += (pos - PosList[nPos])**2
if pos == 0:
ReturnSum = TempSum
elif ReturnSum > TempSum:
... | # -*- coding:utf-8 -*-
n = int(input())
PosList = []
TempSum = 0
ReturnSum = 0
PosList = list(map(int,input().split()))
for pos in range(1,101):
TempSum = 0
for nPos in range(n):
TempSum += (pos - PosList[nPos])**2
if pos == 1:
ReturnSum = TempSum
elif ReturnSum > TempSum:
Re... | [
"call.arguments.change",
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 561,371 | 561,370 | u253479302 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.