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
|
n,k = list(map(int, input("").split()))
out=1
while n/k**out>1:
out+=1
print(out)
|
n,k = list(map(int, input("").split()))
out=1
while n/k**out>=1:
out+=1
print(out)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 558,889
| 558,890
|
u473433753
|
python
|
p02766
|
# Digits
N, K = map(int, input().split())
div = 10 ** 9 + 1
digits = []
while div > K:
div = N // K
digits.append(str(N % K))
N = div
digits.append(str(N % K))
if N // K != 0:
digits.append(str(N // K))
ans = len(digits)
# ans = ''.join(digits[::-1])
print(ans)
|
# Digits
N, K = map(int, input().split())
div = N // K
digits = []
while div > K:
div = N // K
digits.append(str(N % K))
N = div
digits.append(str(N % K))
if N // K != 0:
digits.append(str(N // K))
ans = len(digits)
print(ans)
|
[
"expression.operation.binary.remove"
] | 558,895
| 558,896
|
u191635495
|
python
|
p02766
|
import sys
N, K = map(int, input().split())
if K == 10:
print(len(str(N)))
sys.exit()
p = 0
while True:
num = K ** p
if N <= num:
break
p += 1
print(p)
|
import sys
N, K = map(int, input().split())
if K == 10:
print(len(str(N)))
sys.exit()
p = 0
while True:
num = K ** p
if N < num:
break
p += 1
print(p)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 558,911
| 558,912
|
u898109279
|
python
|
p02766
|
def solve():
N,K = [int(i) for i in input().split()]
digits = 1
while N > K:
digits += 1
N /= K
print(digits)
if __name__ == "__main__":
solve()
|
def solve():
N,K = [int(i) for i in input().split()]
digits = 1
while N >= K:
digits += 1
N /= K
print(digits)
if __name__ == "__main__":
solve()
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 558,913
| 558,914
|
u439619952
|
python
|
p02766
|
MM = input().split()
N = int(MM[0])
K = int(MM[1])
for i in range(11):
if K**i > N:
print(i)
break
|
MM = input().split()
N = int(MM[0])
K = int(MM[1])
for i in range(1000000000000):
if K**i > N:
print(i)
break
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 558,921
| 558,922
|
u970198631
|
python
|
p02766
|
N, K = map(int, input().split())
ans = 0
for i in range(N):
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)
|
[
"call.arguments.add"
] | 558,926
| 558,927
|
u870518235
|
python
|
p02766
|
N, K = map(int, input().split())
ans = 0
for i in range(N):
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)
|
[
"call.arguments.add",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 558,928
| 558,927
|
u870518235
|
python
|
p02766
|
N,K=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)
x2 = Base_10_to_n(N,K)
print( x2 )
|
N,K=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)
x2 = Base_10_to_n(N,K)
print(len(x2))
|
[
"call.arguments.add",
"call.arguments.change"
] | 558,929
| 558,930
|
u455354923
|
python
|
p02766
|
N,K = map(int,input().split())
for i in range(N):
if N >=2**i and N <2**(i+1):
print(i+1)
break
|
N,K = map(int,input().split())
for i in range(N):
if N >=K**i and N <K**(i+1):
print(i+1)
break
|
[
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 558,934
| 558,935
|
u433380437
|
python
|
p02766
|
N, K = map(int, input().split())
import math
n = math.log(N, K)
print(math.ceil(n))
|
N, K = map(int, input().split())
import math
n = math.log(N, K)
print(int(n) + 1)
|
[
"call.arguments.change",
"io.output.change"
] | 558,937
| 558,938
|
u389188163
|
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"
] | 558,939
| 558,940
|
u347600233
|
python
|
p02766
|
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys
INF = float('inf')
def solve(N: int, K: int):
return int(math.log(N+1, K)) + 1
def main():
sys.setrecursionlimit(10 ** 6)
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
print(f'{solve(N, K)}')
if __name__ == '__main__':
main()
|
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys
INF = float('inf')
def solve(N: int, K: int):
return int(math.log(N, K))+1
def main():
sys.setrecursionlimit(10 ** 6)
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
print(f'{solve(N, K)}')
if __name__ == '__main__':
main()
|
[
"expression.operation.binary.remove"
] | 558,941
| 558,942
|
u646336881
|
python
|
p02766
|
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys
INF = float('inf')
def solve(N: int, K: int):
return math.ceil(math.log(N, K))
def main():
sys.setrecursionlimit(10 ** 6)
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
print(f'{solve(N, K)}')
if __name__ == '__main__':
main()
|
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys
INF = float('inf')
def solve(N: int, K: int):
return int(math.log(N, K))+1
def main():
sys.setrecursionlimit(10 ** 6)
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
print(f'{solve(N, K)}')
if __name__ == '__main__':
main()
|
[
"function.return_value.change"
] | 558,943
| 558,942
|
u646336881
|
python
|
p02766
|
import sys
def main():
input = sys.stdin.buffer.readline
n, k = map(int, input().split())
i = 1
while k ** i < n:
i += 1
print(i)
if __name__ == "__main__":
main()
|
import sys
def main():
input = sys.stdin.buffer.readline
n, k = map(int, input().split())
i = 1
while k ** i <= n:
i += 1
print(i)
if __name__ == "__main__":
main()
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 558,948
| 558,949
|
u331327289
|
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(int(math.log(n,k))+1)
|
[
"call.arguments.change",
"io.output.change"
] | 558,950
| 558,951
|
u492910842
|
python
|
p02766
|
import math
N, K = map(int, input().split())
a = N
i = 1
while a > K:
a = a/K
i += 1
print(i)
|
import math
N, K = map(int, input().split())
a = N
i = 1
while a >= K:
a = a/K
i += 1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 558,952
| 558,953
|
u323859575
|
python
|
p02766
|
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)
|
[
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 558,954
| 558,955
|
u612635771
|
python
|
p02766
|
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>0:
N=N//K
b+=1
print(b)
|
[
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.condition.change",
"assignment.variable.change",
"identifier.change",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 558,957
| 558,955
|
u612635771
|
python
|
p02766
|
a,b=map(int,input().split())
res = 1
for i in range(30):
if b**i >= a:
res = i
break
print(res)
|
a,b=map(int,input().split())
res = 1
for i in range(100):
if b**i > a:
res = i
break
print(res)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 558,965
| 558,966
|
u113255362
|
python
|
p02766
|
a,b=map(int,input().split())
res = 1
for i in range(30):
if b**i > a:
res = i
break
print(res)
|
a,b=map(int,input().split())
res = 1
for i in range(100):
if b**i > a:
res = i
break
print(res)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 558,967
| 558,966
|
u113255362
|
python
|
p02766
|
#!/usr/bin/env python3
import collections as cl
import sys
def II():
return int(sys.stdin.readline())
def MI():
return map(int, sys.stdin.readline().split())
def LI():
return list(map(int, sys.stdin.readline().split()))
def main():
N, K = MI()
i = 1
while K ** i < N:
i += 1
print(i)
main()
|
#!/usr/bin/env python3
import collections as cl
import sys
def II():
return int(sys.stdin.readline())
def MI():
return map(int, sys.stdin.readline().split())
def LI():
return list(map(int, sys.stdin.readline().split()))
def main():
N, K = MI()
i = 1
while K ** i <= N:
i += 1
print(i)
main()
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 558,971
| 558,972
|
u574922408
|
python
|
p02766
|
n,k = map(int, input().split())
isFlg = False
i=1
while True:
tmp = k **i
if n <= tmp:
isFlg = True
if isFlg:
break
i+=1
print(i)
|
n,k = map(int, input().split())
isFlg = False
i=1
while True:
tmp = k **i
if n < tmp:
isFlg = True
if isFlg:
break
i+=1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 558,990
| 558,991
|
u320763652
|
python
|
p02766
|
x,y = map(int,input().split())
ans = 1
for i in range(10**10):
if y**(i+1) >= x:
ans = i+1
break
print(ans)
|
x,y = map(int,input().split())
ans = 1
for i in range(10**10):
if y**(i+1) > x:
ans = i+1
break
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 558,992
| 558,993
|
u614181788
|
python
|
p02766
|
N, K = map(int, input().split())
count = 0
while N > K:
N = N / K
count += 1
count += 1
print(count)
|
N, K = map(int, input().split())
count = 0
while N >= K:
N = N / K
count += 1
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 558,994
| 558,995
|
u101350975
|
python
|
p02766
|
n, k = map(int, input().split())
for i in range(10):
if n < k ** i:
break
print(max(1,i))
|
n, k = map(int, input().split())
for i in range(40):
if n < k ** i:
break
print(max(1,i))
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 558,998
| 558,999
|
u303739137
|
python
|
p02766
|
INT_MAX=10**18+7
x=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
GETA=123
###############################################################################
import math as M
n,k=INPUT()
print(M.ceil(M.log(n,k)))
|
INT_MAX=10**18+7
x=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
GETA=123
###############################################################################
import math as M
n,k=INPUT()
print(M.floor(M.log(n,k))+1)
|
[
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 559,015
| 559,016
|
u861075868
|
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"
] | 559,032
| 559,033
|
u839110000
|
python
|
p02766
|
#B
N, K = map(int, input().split())
a = K
i = 1
while N>a:
a *= K
i += 1
print(i)
|
#B
N, K = map(int, input().split())
a = K
i = 1
while N>=a:
a *= K
i += 1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,039
| 559,040
|
u081340269
|
python
|
p02766
|
N,K=map(int,input().split())
hey=N
ans=2
while hey//K >= K:
ans += 1
hey = hey//K
print(ans)
|
N,K=map(int,input().split())
hey=N
ans=1
while hey >= K:
ans += 1
hey = hey//K
print(ans)
|
[
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.remove"
] | 559,041
| 559,042
|
u216752093
|
python
|
p02766
|
N,K=map(int,input().split())
hey=N
ans=1
while hey//K >= K:
ans += 1
hey = hey//K
print(ans)
|
N,K=map(int,input().split())
hey=N
ans=1
while hey >= K:
ans += 1
hey = hey//K
print(ans)
|
[
"expression.operation.binary.remove"
] | 559,044
| 559,042
|
u216752093
|
python
|
p02766
|
N, K = map(int,input().split())
ans = 0
for i in range(10**100):
if K**i < N:
i = i + 1
else:
ans = i
break
print(ans)
|
N, K = map(int,input().split())
ans = 0
for i in range(10**100):
if K**i <= N:
i = i + 1
else:
ans = i
break
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,053
| 559,054
|
u699696451
|
python
|
p02766
|
N, K = map(int,input().split())
ans = 0
for i in range(10**9):
if K**i < N:
i = i + 1
else:
ans = i
break
print(ans)
|
N, K = map(int,input().split())
ans = 0
for i in range(10**100):
if K**i <= N:
i = i + 1
else:
ans = i
break
print(ans)
|
[
"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"
] | 559,055
| 559,054
|
u699696451
|
python
|
p02766
|
#!/usr/bin/env python3
import math
n, k = map(int, input().split())
print(math.ceil(math.log2(n)/math.log2(k)))
|
#!/usr/bin/env python3
import math
n, k = map(int, input().split())
print(math.floor(math.log2(n)/math.log2(k))+1)
|
[
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 559,058
| 559,059
|
u998741086
|
python
|
p02766
|
a = list(map(int,input().split()))
N = a[0]
K = a[1]
count = 1
while 1:
if N <= K**count:
print(count)
break
count += 1
|
a = list(map(int,input().split()))
N = a[0]
K = a[1]
count = 1
while 1:
if N <= (K**count-1):
print(count)
break
count += 1
|
[
"control_flow.branch.if.condition.change"
] | 559,064
| 559,065
|
u202019924
|
python
|
p02766
|
a = list(map(int,input().split()))
N = a[0]
K = a[1]
count = 1
while 1:
if N <= K**count:
print(count)
break
else:
count += 1
|
a = list(map(int,input().split()))
N = a[0]
K = a[1]
count = 1
while 1:
if N <= (K**count-1):
print(count)
break
count += 1
|
[
"control_flow.branch.if.condition.change"
] | 559,066
| 559,065
|
u202019924
|
python
|
p02766
|
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)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,067
| 559,068
|
u699330893
|
python
|
p02766
|
N, K = map(int, input().split())
num = 0
while q > 0:
num = num + 1
q = N // (K**num)
print(num)
|
N, K = map(int, input().split())
num = 0
q = N
while q > 0:
num = num + 1
q = N // (K**num)
print(num)
|
[
"assignment.add"
] | 559,073
| 559,074
|
u394352233
|
python
|
p02766
|
N, K = map(int, input().split())
num = 0
while q > 0:
num = num + 1
q = N // (K**num)
print(num+1)
|
N, K = map(int, input().split())
num = 0
q = N
while q > 0:
num = num + 1
q = N // (K**num)
print(num)
|
[
"expression.operation.binary.remove"
] | 559,075
| 559,074
|
u394352233
|
python
|
p02766
|
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)
|
[
"call.add"
] | 559,088
| 559,089
|
u732870425
|
python
|
p02766
|
from sys import stdin
import math
n, k = [int(x) for x in stdin.readline().rstrip().split()]
cnt = 1
if n <= k:
print(cnt)
exit
kk = k
while n >= kk:
kk = kk * k
cnt += 1
print(cnt)
|
from sys import stdin
import math
n, k = [int(x) for x in stdin.readline().rstrip().split()]
cnt = 1
if n < k:
print(cnt)
else:
kk = k
while n >= kk:
kk = kk * k
cnt += 1
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,092
| 559,093
|
u436664080
|
python
|
p02766
|
from sys import stdin
import math
n, k = [int(x) for x in stdin.readline().rstrip().split()]
cnt = 1
if n < k:
print(cnt)
exit
kk = k
while n > kk:
kk = kk * k
cnt += 1
print(cnt)
|
from sys import stdin
import math
n, k = [int(x) for x in stdin.readline().rstrip().split()]
cnt = 1
if n < k:
print(cnt)
else:
kk = k
while n >= kk:
kk = kk * k
cnt += 1
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,094
| 559,093
|
u436664080
|
python
|
p02766
|
def ten_to_n(X, n):
i = int(X / n)
s = str(X % n)
if (i):
return Base_10_to_n(i, n) + s
return s
def solve():
N, M = map(int, input().split())
n = Base_10_to_n(N, M)
return len(n)
print(solve())
|
def ten_to_n(X, n):
i = int(X / n)
s = str(X % n)
if (i):
return ten_to_n(i, n) + s
return s
def solve():
N, M = map(int, input().split())
n = ten_to_n(N, M)
return len(n)
print(solve())
|
[
"identifier.change",
"call.function.change",
"function.return_value.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 559,095
| 559,096
|
u112317104
|
python
|
p02766
|
N,K=map(int, input().split())
n=0
while K**(n+1)<N:
n+=1
print(n+1)
|
N,K=map(int, input().split())
n=0
while K**(n+1)<=N:
n+=1
print(n+1)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,097
| 559,098
|
u748311048
|
python
|
p02766
|
n,k=map(int,input().split())
t=0
while n>k**t:
t+=1
print(t)
|
n,k=map(int,input().split())
t=0
while n>=k**t:
t+=1
print(t)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,099
| 559,100
|
u537962130
|
python
|
p02766
|
N, K = map(int, input().split())
for i in range(1, 100)[::-1]:
if N // (K ** i) != 0:
print(i + 1)
break
|
N, K = map(int, input().split())
for i in range(1, 100)[::-1]:
if N // (K ** i) != 0:
print(i + 1)
break
else:
print(1)
|
[
"call.add"
] | 559,101
| 559,102
|
u780346073
|
python
|
p02766
|
import numpy as np
i = list(map(int, input().split()))
N = i[0]
K = i[1]
N_ = np.base_repr(N, K)
print(N_)
print(len(str(N_)))
|
import numpy as np
i = list(map(int, input().split()))
N = i[0]
K = i[1]
N_ = np.base_repr(N, K)
print(len(str(N_)))
|
[
"call.remove"
] | 559,105
| 559,106
|
u891125728
|
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 = 0
while N >= K ** count:
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,107
| 559,108
|
u165368960
|
python
|
p02766
|
def resolve():
import math
n,k = map(int, input().split())
log = math.log(n,k)
print(math.ceil(log))
resolve()
|
def resolve():
import math
n,k = map(int, input().split())
log = math.log(n,k)
print(int(log)+1)
resolve()
|
[
"call.arguments.change",
"io.output.change"
] | 559,111
| 559,112
|
u793868662
|
python
|
p02766
|
n, k = map(int, input().split())
ans = 0
num = 1
while num < n:
num *= k
ans += 1
print(ans)
|
n, k = map(int, input().split())
ans = 0
num = 1
while num <= n:
num *= k
ans += 1
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,122
| 559,123
|
u023958502
|
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"
] | 559,130
| 559,131
|
u964521959
|
python
|
p02766
|
N, K = map(int, input().split())
ans = 1
for i in range(100):
if N > K**(i):
ans = i+1
print(ans)
|
N, K = map(int, input().split())
ans = 1
for i in range(100):
if N >= K**(i):
ans = i+1
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,132
| 559,133
|
u528720841
|
python
|
p02766
|
n, k = [int(x) for x in input().split()]
count = 1
while True:
if (n>k**(count)):
count += 1
else:
break
print(count)
|
n, k = [int(x) for x in input().split()]
count = 1
while True:
if (n>=k**count):
count += 1
else:
break
print(count)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,134
| 559,135
|
u590825760
|
python
|
p02766
|
N, K = map(int, input().split(' '))
maxDigits = 0
for i in range(10):
if N/K**i >= 1:
maxDigits = i+1
print(maxDigits)
|
N, K = map(int, input().split(' '))
maxDigits = 0
for i in range(1000):
if N/K**i >= 1:
maxDigits = i+1
else:
break;
print(maxDigits)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 559,136
| 559,137
|
u143683072
|
python
|
p02766
|
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)
|
[
"literal.number.integer.change",
"assignment.value.change"
] | 559,149
| 559,150
|
u585819925
|
python
|
p02766
|
n, k = map(int, input().split())
x = 1
ans = 0
while x < n:
x *= k
ans += 1
print(ans)
|
n, k = map(int, input().split())
x = 1
ans = 0
while x <= n:
x *= k
ans += 1
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,157
| 559,158
|
u737298927
|
python
|
p02766
|
N,K = map(int,input().split())
for i in range(10000000001) :
p = pow(K,i)
if (N <= p) :
print(i)
break
|
N,K = map(int,input().split())
for i in range(10000000001) :
p = pow(K,i)
# print(K,i,p)
if (N < p) :
print(i)
break
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,164
| 559,165
|
u993642190
|
python
|
p02766
|
n,k = (int(x) for x in input().split())
i = 0
check = True
while check:
if n>k**i:
i += 1
else:
check = False
print(i)
|
n,k = (int(x) for x in input().split())
i = 0
check = True
while check:
if n>=k**i:
i += 1
else:
check = False
print(i)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,172
| 559,173
|
u970082363
|
python
|
p02766
|
N,K = map(int,input().split())
count = 1
while N > K:
N = N/K
count += 1
print(count)
|
N,K = map(int,input().split())
count = 1
while N >= K:
N = N/K
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,174
| 559,175
|
u562015767
|
python
|
p02766
|
N, K = tuple(map(int, input().split()))
i = 0
while(N > K ** i):
i += 1
print(i)
|
N, K = tuple(map(int, input().split()))
i = 0
while(N >= K ** i):
i += 1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,176
| 559,177
|
u824756230
|
python
|
p02766
|
#!/usr/bin/env python3
import sys
from itertools import takewhile, count
def solve(N: int, K: int):
return max(takewhile(lambda i: N >= (K ** i), count(1))) + 1
# 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
print(solve(N, K))
if __name__ == '__main__':
main()
|
#!/usr/bin/env python3
import sys
from itertools import takewhile, count
def solve(N: int, K: int):
return max(takewhile(lambda i: N >= (K ** i), count(0))) + 1
# 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
print(solve(N, K))
if __name__ == '__main__':
main()
|
[
"literal.number.integer.change",
"call.arguments.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 559,180
| 559,181
|
u477320129
|
python
|
p02766
|
#!/usr/bin/env python3
import sys
from itertools import takewhile, count
def solve(N: int, K: int):
return max(takewhile(lambda i: N > (K ** i), count(1))) + 1
# 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
print(solve(N, K))
if __name__ == '__main__':
main()
|
#!/usr/bin/env python3
import sys
from itertools import takewhile, count
def solve(N: int, K: int):
return max(takewhile(lambda i: N >= (K ** i), count(0))) + 1
# 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
print(solve(N, K))
if __name__ == '__main__':
main()
|
[
"expression.operator.compare.change",
"call.arguments.change",
"function.return_value.change",
"expression.operation.binary.change",
"literal.number.integer.change"
] | 559,182
| 559,181
|
u477320129
|
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"
] | 559,183
| 559,184
|
u967843578
|
python
|
p02766
|
n, k = map(int, input().split())
result = ''
while n != 0:
result = str(n % k) + result
n = n // k
result = int(result)
i = 0
while result / 10 ** i >= 1:
i += 1
print(i + 1)
|
n, k = map(int, input().split())
result = ''
while n != 0:
result = str(n % k) + result
n = n // k
result = int(result)
i = 0
while result / 10 ** i >= 1:
i += 1
print(i)
|
[
"expression.operation.binary.remove"
] | 559,187
| 559,188
|
u104005543
|
python
|
p02766
|
N, K = map(int, input().split())
count = 1
while N > K:
N = N/K
count += 1
print(count)
|
N, K = map(int, input().split())
count = 1
while N >= K:
N = N/K
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,193
| 559,194
|
u517724953
|
python
|
p02766
|
n,m=map(int,input().split())
lst_b=[]
lst_c=[]
while(True):
b=n//m
c=n%m
lst_b.append(b)
lst_c.append(c)
n=b
if b==0:
print("".join(map(str,lst_c[::-1])))
break
|
n,m=map(int,input().split())
lst_b=[]
lst_c=[]
while(True):
b=n//m
c=n%m
lst_b.append(b)
lst_c.append(c)
n=b
if b==0:
print(len("".join(map(str,lst_c[::-1]))))
break
|
[
"call.arguments.add",
"call.arguments.change"
] | 559,195
| 559,196
|
u123745130
|
python
|
p02766
|
import os
def main():
N,K = (int(x) for x in input().split())
count = 0
while(N > 0):
N = N // K
print(N)
count += 1
print(count)
if __name__ == "__main__":
main()
|
import os
def main():
N,K = (int(x) for x in input().split())
count = 0
while(N > 0):
N = N // K
count += 1
print(count)
if __name__ == "__main__":
main()
|
[
"call.remove"
] | 559,198
| 559,199
|
u928758473
|
python
|
p02766
|
def resolve():
n, k = map(int, input().split())
div_val = k
i = 1
while True:
if n / div_val <= 1:
print(i)
return
else:
div_val *= k
i += 1
resolve()
|
def resolve():
n, k = map(int, input().split())
div_val = k
i = 1
while True:
if n / div_val < 1:
print(i)
return
else:
div_val *= k
i += 1
resolve()
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,206
| 559,207
|
u105210954
|
python
|
p02766
|
n,k=map(int,input().split())
x=n
count=0
while(x>1):
x/=k
count+=1
print(count)
|
n,k=map(int,input().split())
x=n
count=0
while(x>=1):
x/=k
count+=1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,215
| 559,216
|
u755313517
|
python
|
p02766
|
from math import log, ceil
N, K = map(int, input().split())
ans = ceil(log(N, K))
print(ans)
|
from math import log, ceil
N, K = map(int, input().split())
d = int(log(N, K)) + 1
print(d)
|
[
"assignment.variable.change",
"identifier.change",
"assignment.value.change",
"call.function.change",
"call.arguments.change",
"io.output.change"
] | 559,225
| 559,226
|
u538632589
|
python
|
p02766
|
N, K = list(map(int,input().split()))
ans = 1
while N > K:
N //=K
ans += 1
print(ans)
|
N, K = list(map(int,input().split()))
ans = 0
while N > 0:
N //=K
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.condition.change"
] | 559,227
| 559,228
|
u178079174
|
python
|
p02766
|
N, K = list(map(int,input().split()))
ans = 1
while N > K:
N /=K
ans += 1
print(ans)
|
N, K = list(map(int,input().split()))
ans = 0
while N > 0:
N //=K
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.condition.change",
"expression.operator.change"
] | 559,229
| 559,228
|
u178079174
|
python
|
p02766
|
N,K = map(int,input().split())
lis = [K**i for i in range(70)]
for i in range(len(lis)):
if N -lis[i]<= 0 and i ==0:
print(1)
break
if N -lis[i] <=0:
print(i)
break
|
N,K = map(int,input().split())
lis = [K**i for i in range(100)]
for i in range(len(lis)):
if N -lis[i]< 0 and i ==0:
print(1)
break
if N -lis[i] <0:
print(i)
break
|
[
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,230
| 559,231
|
u652445326
|
python
|
p02766
|
N,K=list(map(int,input().split()))
count=0
while N>1:
N/=K
count+=1
print(count)
|
N,K=list(map(int,input().split()))
count=0
while N>=1:
N/=K
count+=1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,232
| 559,233
|
u857547702
|
python
|
p02766
|
import math
N, K = map(int, input().split())
ans = math.ceil(math.log(N, K))
print(ans)
|
import math
N, K = map(int, input().split())
ans = int(math.log(N, K) + 1)
print(ans)
|
[
"assignment.value.change"
] | 559,234
| 559,235
|
u531220228
|
python
|
p02766
|
N, K = map(int, input().split())
count = 0
s = 1
if K == 10:
n = list(str(N))
keta = len(n)
print(keta)
exit()
else:
while N > K**count:
count += 1
print(count)
|
N, K = map(int, input().split())
count = 0
s = 1
if K == 10:
n = list(str(N))
keta = len(n)
print(keta)
exit()
else:
while N >= K**count:
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,238
| 559,239
|
u074687136
|
python
|
p02766
|
N,K = map(int,input().split())
count = 0
while True:
if N>(K**count):
count += 1
else:
break
if N == 1:
count = 1
print(count)
|
N,K = map(int,input().split())
count = 0
while True:
if N>=(K**count):
count += 1
else:
break
if N == 1:
count = 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,252
| 559,253
|
u004312392
|
python
|
p02766
|
N, K = map(int, input().split())
cnt = 0
temp = 1
while N > temp:
cnt += 1
temp *= K
print(cnt)
|
N, K = map(int, input().split())
cnt = 0
temp = 1
while N >= temp:
cnt += 1
temp *= K
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,254
| 559,255
|
u135346354
|
python
|
p02766
|
#!/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
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()
|
[
"call.arguments.change",
"io.output.change"
] | 559,264
| 559,265
|
u628583308
|
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"
] | 559,268
| 559,269
|
u973108807
|
python
|
p02766
|
N, K = map(int, input().split()) #数字
ans = 1
cou = K
while cou < N:
# print(cou)
cou *= K
ans += 1
print(ans)
|
N, K = map(int, input().split()) #数字
ans = 1
cou = K
while cou <= N:
# print(cou)
cou *= K
ans += 1
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,274
| 559,275
|
u620238824
|
python
|
p02766
|
N,K = map(int,input().split())
if N ==0 or N==1:
print(1)
exit()
for i in range(1,10000,1):
if K**i <= N and N < K**(i+1) -1:
print(i+1)
exit()
|
N,K = map(int,input().split())
if N ==0 or N==1:
print(1)
exit()
for i in range(1,10000,1):
if K**i <= N and N <= K**(i+1) -1:
print(i+1)
exit()
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,283
| 559,284
|
u364862909
|
python
|
p02766
|
N,K = map(int,input().split())
if N ==0 or N==1:
print(1)
exit()
for i in range(1,10000,1):
if K**i < N and N < K**(i+1) -1:
print(i+1)
exit()
|
N,K = map(int,input().split())
if N ==0 or N==1:
print(1)
exit()
for i in range(1,10000,1):
if K**i <= N and N <= K**(i+1) -1:
print(i+1)
exit()
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,285
| 559,284
|
u364862909
|
python
|
p02766
|
n, k = map(int, input().split())
c = 0
while(n != 0):
n //= k
print(n)
c += 1
print(c)
|
n, k = map(int, input().split())
c = 0
while(n != 0):
n //= k
c += 1
print(c)
|
[
"call.remove"
] | 559,286
| 559,287
|
u236536206
|
python
|
p02766
|
n,k=map(int,input().split())
cnt=0
m=0
while n-m>0:
cnt+=1
m=k**cnt
print(cnt)
|
n,k=map(int,input().split())
cnt=0
m=0
while n-m>=0:
cnt+=1
m=k**cnt
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,288
| 559,289
|
u077898957
|
python
|
p02766
|
N, K = map(int, input().split())
for p in range(1, 30):
if K**(p-1) <= N and N < K**p:
print(p)
|
N, K = map(int, input().split())
for p in range(1, 100):
if K**(p-1) <= N and N < K**p:
print(p)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 559,300
| 559,301
|
u997927785
|
python
|
p02766
|
N, K = map(int, input().split())
for p in range(30):
if K**(p-1) <= N and N < K**p:
print(p)
|
N, K = map(int, input().split())
for p in range(1, 100):
if K**(p-1) <= N and N < K**p:
print(p)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 559,302
| 559,301
|
u997927785
|
python
|
p02766
|
N,K=map(int,input().split())
i=0
while N>K**i:
i=i+1
else:
print(i+1)
|
N,K=map(int,input().split())
i=0
while N>=K**i:
i=i+1
else:
print(i)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"expression.operation.binary.remove"
] | 559,305
| 559,306
|
u428199834
|
python
|
p02766
|
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 N >= K:
N = N / K
cnt += 1
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,314
| 559,315
|
u491330513
|
python
|
p02766
|
n,k = map(int,input().split())
i = 0
while (n-k**i>0):
i += 1
print(i)
|
n,k = map(int,input().split())
i = 0
while (n-k**i>=0):
i += 1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,316
| 559,317
|
u247830763
|
python
|
p02766
|
import sys
sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline
def solve():
n, k = map(int,input().split())
x = 1
y = 0
while x < n:
x *= k
y += 1
print(y)
if __name__ == '__main__':
solve()
|
import sys
sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline
def solve():
n, k = map(int,input().split())
x = 1
y = 0
while n:
n //= k
y += 1
print(y)
if __name__ == '__main__':
solve()
|
[] | 559,318
| 559,319
|
u736443076
|
python
|
p02766
|
# input
N, K = map(int, input().split())
i = 2
while N >= K ** i:
if N >= K ** i:
i += 1
print(i)
|
# input
N, K = map(int, input().split())
i = 1
while N >= K ** i:
if N >= K ** i:
i += 1
print(i)
|
[
"literal.number.integer.change",
"assignment.value.change"
] | 559,323
| 559,324
|
u284363684
|
python
|
p02766
|
# input
N, K = map(int, input().split())
i = 2
while N > K ** i:
if N > K ** i:
i += 1
print(i)
|
# input
N, K = map(int, input().split())
i = 1
while N >= K ** i:
if N >= K ** i:
i += 1
print(i)
|
[
"literal.number.integer.change",
"assignment.value.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"control_flow.branch.if.condition.change"
] | 559,325
| 559,324
|
u284363684
|
python
|
p02766
|
import sys
n,k = map(int,input().split())
if n == 1:
print(1)
sys.exit()
i = 0
num = 1
while True:
if n <= num:
break
num *= k
i += 1
print(i)
|
import sys
n,k = map(int,input().split())
if n == 1:
print(1)
sys.exit()
i = 0
num = 1
while True:
if n < num:
break
num *= k
i += 1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,338
| 559,339
|
u773265208
|
python
|
p02766
|
n,k = map(int,input().split())
m = 1
while n > k**m:
m += 1
print(m)
|
n,k = map(int,input().split())
m = 1
while n >= k**m:
m += 1
print(m)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 559,340
| 559,341
|
u571647099
|
python
|
p02766
|
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)
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 559,342
| 559,343
|
u626881915
|
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"
] | 559,348
| 559,349
|
u329785342
|
python
|
p02766
|
n,k=map(int,input().split())
for i in range(10000000):
if k**i-1>n:
print(i)
break
|
n,k=map(int,input().split())
for i in range(10000000):
if k**i-1>=n:
print(i)
break
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 559,354
| 559,355
|
u622847899
|
python
|
p02766
|
n, k = map(int,input().split())
know = 1
for i in range(n):
if (n+0.5)//know == 0:
print(max(1,i))
break
else:
know *= k
|
n, k = map(int,input().split())
know = 1
for i in range(10**9):
if (n+0.5)//know == 0:
print(max(1,i))
break
else:
know *= k
|
[
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 559,362
| 559,363
|
u169350228
|
python
|
p02766
|
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))
|
[] | 559,370
| 559,371
|
u819593641
|
python
|
p02766
|
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 > K-1:
ans += 1
N //= K
print(ans+1)
|
[
"call.remove"
] | 559,372
| 559,373
|
u707808519
|
python
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.