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 |
|---|---|---|---|---|---|---|---|
p02721 | N,K,C = map(int,input().split())
S = list(input())
F = []
maru = 0
last = -10**9
span = C
for i in range(N):
if S[i]=="o" and span >= C:
maru += 1
last = i
F.append([maru,last])
span = 0
else:
span += 1
F.append([maru,last])
#print(F)
s = S[::-1]
maru = 0
last = 1... | N,K,C = map(int,input().split())
S = list(input())
F = []
maru = 0
last = -10**9
span = C
for i in range(N):
if S[i]=="o" and span >= C:
maru += 1
last = i
F.append([maru,last])
span = 0
else:
span += 1
F.append([maru,last])
#print(F)
s = S[::-1]
maru = 0
last = 1... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 493,486 | 493,485 | u620480037 | python |
p02721 | n, k, c = map(int, input().split())
s = input()
dpl = []
dpr = []
ans = []
count = 0
i = 0
while count < k:
if s[i]=="o":
dpl.append(i)
count += 1
i += c+1
else: i += 1
count = 0
i = n-1
while count < k:
if s[i]=="o":
dpr.append(i)
count += 1
i += -c-1
els... | n, k, c = map(int, input().split())
s = input()
dpl = []
dpr = []
ans = []
count = 0
i = 0
while count < k:
if s[i]=="o":
dpl.append(i)
count += 1
i += c+1
else: i += 1
count = 0
i = n-1
while count < k:
if s[i]=="o":
dpr.append(i)
count += 1
i += -c-1
els... | [
"call.arguments.change"
] | 493,494 | 493,495 | u700805562 | python |
p02721 | N, K, C = map(int, input().split())
S = input()
L = [0] * K
i = 0
x = 0
while i<K and x<N:
if S[x] == 'o':
L[i] = x
i += 1
x += C
else:
x += 1
R = [0] * K
i = K-1
x = N-1
while i>=0 and x>=0:
if S[x] == 'o':
R[i] = x
i -= 1
x -= C
else:
x... | N, K, C = map(int, input().split())
S = input()
L = [0] * K
i = 0
x = 0
while i<K and x<N:
if S[x] == 'o':
L[i] = x
i += 1
x += C+1
else:
x += 1
R = [0] * K
i = K-1
x = N-1
while i>=0 and x>=0:
if S[x] == 'o':
R[i] = x
i -= 1
x -= C+1
else:
... | [
"expression.operation.binary.add"
] | 493,496 | 493,497 | u475503988 | python |
p02721 | data = input().split(" ")
N, K, C = int(data[0]), int(data[1]), int(data[2])
S = input()
point = 0
work_start = [0] * (K + 1)
for i in range(1, K + 1):
point = S.find("o", point, N)
work_start[i] = point + 1
point += C
point = N
work_end = [0] * (K + 1)
for i in range(K, 0, -1):
point = S.rfind("o", 0, point)... | data = input().split(" ")
N, K, C = int(data[0]), int(data[1]), int(data[2])
S = input()
point = 0
work_start = [0] * (K + 1)
for i in range(1, K + 1):
point = S.find("o", point, N)
work_start[i] = point + 1
point += (C + 1)
point = N
work_end = [0] * (K + 1)
for i in range(K, 0, -1):
point = S.rfind("o", 0, ... | [] | 493,526 | 493,527 | u946404093 | python |
p02721 | N, K, C = map(int,input().split())
S = list(input())
def solve(List):
ans = []
i = 0
while i < N:
if List[i] == 'o':
ans.append(i+1)
i += C
i += 1
return ans
n = solve(S)
if len(n) > K:
pass
else:
r = solve(S[::-1])
r = list(map(lambda x: N+1-x, r[:... | N, K, C = map(int,input().split())
S = list(input())
def solve(List):
ans = []
i = 0
while i < N:
if List[i] == 'o':
ans.append(i+1)
i += C
i += 1
return ans
n = solve(S)
if len(n) > K:
pass
else:
r = solve(S[::-1])
r = list(map(lambda x: N+1-x, r[:... | [
"call.add"
] | 493,537 | 493,538 | u189479417 | python |
p02721 | def main():
n, k, c = (int(i) for i in input().split())
s = input()
if k > sum(1 for c in s if c == 'o'):
return
latest = [None] * k
earliest = [None] * k
earliest[0] = s.index('o')
for i in range(1, k):
try:
earliest[i] = s.index('o', earliest[i-1] + c + 1)
... | def main():
n, k, c = (int(i) for i in input().split())
s = input()
if k > sum(1 for c in s if c == 'o'):
return
latest = [None] * k
earliest = [None] * k
earliest[0] = s.index('o')
for i in range(1, k):
try:
earliest[i] = s.index('o', earliest[i-1] + c + 1)
... | [
"expression.operation.binary.remove"
] | 493,586 | 493,587 | u091307273 | python |
p02721 | # E - Yutori
N,K,C = map(int,input().split())
S = input()
L = [0]*K
R = [0]*K
i = 0
for j in range(K):
while S[i]!='o':
i += 1
L[j] = i
i += C+1
i = K-1
for j in range(K-1,-1,-1):
while S[i]!='o':
i -= 1
R[j] = i
i -= C+1
for j in range(K):
if L[j]==R[j]:
print... | # E - Yutori
N,K,C = map(int,input().split())
S = input()
L = [0]*K
R = [0]*K
i = 0
for j in range(K):
while S[i]!='o':
i += 1
L[j] = i
i += C+1
i = N-1
for j in range(K-1,-1,-1):
while S[i]!='o':
i -= 1
R[j] = i
i -= C+1
for j in range(K):
if L[j]==R[j]:
print... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 493,608 | 493,609 | u980205854 | python |
p02721 | N,K,C = map(int,input().split())
S = input()
L = []
R = []
i = 0
while i < N:
if S[i] == "o":
L.append(i)
i += C
i += 1
j = N-1
while j >= 0:
if S[j] == "o":
R.append(j)
j -= C
j -= 1
for i in range(K):
if L[i] == R[K-1-i]:
print(L[i]+1)
exit()
... | N,K,C = map(int,input().split())
S = input()
L = []
R = []
i = 0
while i < N:
if S[i] == "o":
L.append(i)
i += C
i += 1
j = N-1
while j >= 0:
if S[j] == "o":
R.append(j)
j -= C
j -= 1
for i in range(K):
if L[i] == R[K-1-i]:
print(L[i]+1)
| [
"call.remove"
] | 493,620 | 493,621 | u446774692 | python |
p02721 | n,k,c=[int(x) for x in input().split()]
s=list(input())
L=[]
R=[]
i=0
while i < n:
if s[i]=="o":
L.append(i)
i+=2
i+=1
i=0
while i < n:
if s[n-i-1]=="o":
R.append(n-i-1)
i+=2
i+=1
days=[]
for i in range(k):
if L[i]==R[i]:
days.append(L[i])
for i in ran... | n,k,c=[int(x) for x in input().split()]
s=list(input())
L=[]
R=[]
i=0
while i < n:
if s[i]=="o":
L.append(i)
i+=c
i+=1
i=0
while i < n:
if s[n-i-1]=="o":
R.append(n-i-1)
i+=c
i+=1
days=[]
for i in range(k):
if L[i]==R[k-i-1]:
days.append(L[i])
for ... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 493,644 | 493,645 | u526780498 | python |
p02721 | #入力受け取り
N, K, C=map(int, input().split())
S='x'+input() #インデックスと日数を合わせるために先頭に'x'を追加
#前詰めな働き方の場合で働く日を求める
A=[] #前詰めで働く場合の働く日リスト
i=1 #1日目から判定スタート
while len(A)<K:
if S[i]=='o':
#i日目に働けるなら、リストにiを追加し、iをC+1だけ進める
A.append(i+1)
i+=(C+1)
else:
#i日目に働けないならその日は働けないので(小泉構文)、iに1足すのみ
i+=1
#後ろ詰めな働き方の場合で働く... | #入力受け取り
N, K, C=map(int, input().split())
S='x'+input() #インデックスと日数を合わせるために先頭に'x'を追加
#前詰めな働き方の場合で働く日を求める
A=[] #前詰めで働く場合の働く日リスト
i=1 #1日目から判定スタート
while len(A)<K:
if S[i]=='o':
#i日目に働けるなら、リストにiを追加し、iをC+1だけ進める
A.append(i)
i+=(C+1)
else:
#i日目に働けないならその日は働けないので(小泉構文)、iに1足すのみ
i+=1
#後ろ詰めな働き方の場合で働く日を... | [
"expression.operation.binary.remove"
] | 493,665 | 493,666 | u095021077 | python |
p02721 | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factori... | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factori... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 493,674 | 493,675 | u499381410 | python |
p02721 | nkc=input().split()
K=int(nkc[1])
C=int(nkc[2])
s=input()
workday_list=[]
for i,youso in enumerate(s) :
if youso=='o' :
workday_list.append(i+1)
s=1
current_num=0
current_num1=1
list1=[]
list1.append(workday_list[0])
while(s<K) :
if current_num1>=len(workday_list):
break
elif workday_list[curren... | nkc=input().split()
K=int(nkc[1])
C=int(nkc[2])
s=input()
workday_list=[]
for i,youso in enumerate(s) :
if youso=='o' :
workday_list.append(i+1)
s=1
current_num=0
current_num1=1
list1=[]
list1.append(workday_list[0])
while(s<K) :
if current_num1>=len(workday_list):
break
elif workday_list[curren... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 493,691 | 493,692 | u876295560 | python |
p02721 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 5 22:11:18 2020
@author: Kanaru Sato
"""
n,k,c = list(map(int, input().split()))
s = list(input())
early = []
late = []
i = 0
count = 0
while i < n and count < k:
if s[i] == "o":
early.append(i)
i = i+c+1
count = count+1
else:
i... | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 5 22:11:18 2020
@author: Kanaru Sato
"""
n,k,c = list(map(int, input().split()))
s = list(input())
early = []
late = []
i = 0
count = 0
while i < n and count < k:
if s[i] == "o":
early.append(i)
i = i+c+1
count = count+1
else:
i... | [
"call.remove"
] | 493,703 | 493,704 | u674052742 | python |
p02721 | n,k,c=map(int,input().split())
s=list(input())
for i in range(len(s)):
if s[i]=="o":
s[i]=True
else:
s[i]=False
i=0
work1=[]
while len(work1)<k:
if s[i]:
work1.append(i)
i+=c+1
else:
i+=1
i=n-1
work2=[]
while len(work2)<k:
if s[i]:
work2.append(i)
i-=c+1
else:
i-=1
for i in range(k):
if work1[i]=... | n,k,c=map(int,input().split())
s=list(input())
for i in range(len(s)):
if s[i]=="o":
s[i]=True
else:
s[i]=False
i=0
work1=[]
while len(work1)<k:
if s[i]:
work1.append(i)
i+=c+1
else:
i+=1
i=n-1
work2=[]
while len(work2)<k:
if s[i]:
work2.append(i)
i-=c+1
else:
i-=1
work2.sort()
for i in range(k):
... | [
"call.add"
] | 493,708 | 493,709 | u459590249 | python |
p02721 | N,K,C = map(int,input().split())
S = input()
L = []
R = []
i = 0
while i < N:
if S[i] == "o":
L.append(i)
if len(L) == K:
break
i += C
else:
i += 1
i = N-1
while i >= 0:
if S[i] == "o":
R.append(i)
if len(R) == K:
break
i -= C
... | N,K,C = map(int,input().split())
S = input()
L = []
R = []
i = 0
while i < N:
if S[i] == "o":
L.append(i)
if len(L) == K:
break
i += C+1
else:
i += 1
i = N-1
while i >= 0:
if S[i] == "o":
R.append(i)
if len(R) == K:
break
i -= C... | [
"expression.operation.binary.add"
] | 493,717 | 493,718 | u231095456 | python |
p02721 | n,k,c = map(int,input().split())
S = input()
left = [ -1 for i in range(k)]
right = [ -1 for i in range(k)]
pointer = 0
for l in range(k):
for s in range(pointer,n):
if S[s] == 'o':
left[l] = s
pointer = s+c
break
pointer = n-1
for r in range(k):
for s in range(pointer,0,-1):
if S[s] ... |
n,k,c = map(int,input().split())
S = input()
left = [ -1 for i in range(k)]
right = [ -1 for i in range(k)]
pointer = 0
for l in range(k):
for s in range(pointer,n):
if S[s] == 'o':
left[l] = s
pointer = s+c+1
break
pointer = n-1
for r in range(k):
for s in range(pointer,-1,-1):
if S... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.unary.add",
"control_flow.loop.range.bounds.step.change"
] | 493,727 | 493,728 | u521866787 | python |
p02721 | N,K,C=map(int,input().split())
S=input()
L=[0 for i in range(K)]
R=[0 for i in range(K)]
n=0
rc=0
lc=0
while True:
if lc==K:
break
if S[n]=="o":
L[lc]=n+1
n+=C+1
lc+=1
else:
n+=1
n=N-1
while True:
if rc==K:
break
if S[n]=="o":
R[N-1-rc]=n+1
n-=C+1
rc+=1
else:
n-=1
for... | N,K,C=map(int,input().split())
S=input()
L=[0 for i in range(K)]
R=[0 for i in range(K)]
n=0
rc=0
lc=0
while True:
if lc==K:
break
if S[n]=="o":
L[lc]=n+1
n+=C+1
lc+=1
else:
n+=1
n=N-1
while True:
if rc==K:
break
if S[n]=="o":
R[K-1-rc]=n+1
n-=C+1
rc+=1
else:
n-=1
for... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 493,731 | 493,732 | u692311686 | python |
p02721 | n,k,c=map(int,input().split())
s=input()
#働く日のうちi日目についてそれ以後でないと働けない日をL[i]とする配列を考える
#働く日のうちi日目についてそれ以前でないと働けない日をR[i]とする配列も考える
#その二つが同じとき、必ず働かなければいけない日になる
#L[i]があった時、L[i]+c+1以降からしか働けないことに注意(vice versa)
#バグ?なんで?
l=[-1]*k
r=[-1]*k
nowl=0
indl=0
while nowl<n and indl<k:
for i in range(nowl,n):
if s[i]=="o":
... | n,k,c=map(int,input().split())
s=input()
#働く日のうちi日目についてそれ以後でないと働けない日をL[i]とする配列を考える
#働く日のうちi日目についてそれ以前でないと働けない日をR[i]とする配列も考える
#その二つが同じとき、必ず働かなければいけない日になる
#L[i]があった時、L[i]+c+1以降からしか働けないことに注意(vice versa)
#バグ?なんで?
l=[-1]*k
r=[-1]*k
nowl=0
indl=0
while nowl<n and indl<k:
for i in range(nowl,n):
if s[i]=="o":
... | [
"call.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 493,733 | 493,734 | u989345508 | python |
p02721 | N, K, C = map(int, input().split())
S = input()
Sr = "".join(list(reversed(S)))
wd = []
wdl = []
pw = 0
pwl = 0
for d in range(K):
# 先詰めを探す
while True:
if S[pw] == ('o'):
wd.append(pw)
break
pw += 1
pw += C + 1
# 後詰めを探す
while True:
if Sr[pwl]... | N, K, C = map(int, input().split())
S = input()
Sr = "".join(list(reversed(S)))
wd = []
wdl = []
pw = 0
pwl = 0
for d in range(K):
# 先詰めを探す
while True:
if S[pw] == ('o'):
wd.append(pw)
break
pw += 1
pw += C + 1
# 後詰めを探す
while True:
if Sr[pwl]... | [
"expression.operation.binary.add"
] | 493,737 | 493,738 | u726285999 | python |
p02721 | N,K,C= map(int,input().split())
S = input()
T = [n for n, v in enumerate(S) if v == "o"]
a,b=[T[0]],[T[-1]]
for i in range(len(T)):
if len(a)!=K:
if T[i]-a[-1]>C:
a.append(T[i])
if len(b)!=K:
if b[0]-T[-i-1]>C:
b.append(T[-i-1])
for i in range(K):
if a[i]==b[-i-1]:
print(a[i]+1)
... | N,K,C= map(int,input().split())
S = input()
T = [n for n, v in enumerate(S) if v == "o"]
a,b=[T[0]],[T[-1]]
for i in range(len(T)):
if len(a)!=K:
if T[i]-a[-1]>C:
a.append(T[i])
if len(b)!=K:
if b[-1]-T[-i-1]>C:
b.append(T[-i-1])
for i in range(K):
if a[i]==b[-i-1]:
print(a[i]+1)
... | [
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"expression.operation.unary.add"
] | 493,793 | 493,794 | u919025034 | python |
p02721 | #!/usr/bin/env python3
import sys
def solve(N: int, K: int, C: int, S: str):
# 最善だったら何ケースか
work = 0
rest = 0
startWork = -1
leftIndices = set()
rightIndices = set()
for i in range(N):
if S[i] == "o" and rest <= 0:
rest = C
work += 1
leftIndices.a... | #!/usr/bin/env python3
import sys
def solve(N: int, K: int, C: int, S: str):
# 最善だったら何ケースか
work = 0
rest = 0
startWork = -1
leftIndices = set()
rightIndices = set()
for i in range(N):
if S[i] == "o" and rest <= 0:
rest = C
work += 1
leftIndices.a... | [
"call.add",
"call.arguments.change"
] | 493,807 | 493,808 | u873927631 | python |
p02721 | #!/usr/bin/env python3
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collection... | #!/usr/bin/env python3
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collection... | [
"call.arguments.add",
"call.arguments.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 493,809 | 493,810 | u423585790 | python |
p02721 | k,y,c = map( int, input().split(" "))
ss = input()
asc = []
dsc = []
cnt = 0
err_flg = 0
while( True ):
if(len(ss) <= cnt):
err_flg = 1
break
if( ss[cnt] == "o"):
asc.append( cnt )
cnt += c+1
else:
cnt += 1
if( len(asc)==y ):
break
cnt = 0
ss = ss[::-1]
while( True ):
if(len(ss... | k,y,c = map( int, input().split(" "))
ss = input()
asc = []
dsc = []
cnt = 0
err_flg = 0
while( True ):
if(len(ss) <= cnt):
err_flg = 1
break
if( ss[cnt] == "o"):
asc.append( cnt )
cnt += c+1
else:
cnt += 1
if( len(asc)==y ):
break
cnt = 0
ss = ss[::-1]
while( True ):
if(len(ss... | [
"expression.operation.binary.add"
] | 493,817 | 493,818 | u212263866 | python |
p02721 | import copy
n,k,c = map(int,input().split())
s = list(input())
front = []
back = []
# 前から貪欲
j = copy.copy(k)
i = 0
while j > 0:
if s[i] == "o":
front.append(i)
i += c+1
j -= 1
else:
i += 1
# 後ろから貪欲
j = copy.copy(k)
i = n-1
while j > 0:
if s[i] == "o":
back.append(i)
i -= c+1
... | import copy
n,k,c = map(int,input().split())
s = list(input())
front = []
back = []
# 前から貪欲
j = copy.copy(k)
i = 0
while j > 0:
if s[i] == "o":
front.append(i)
i += c+1
j -= 1
else:
i += 1
# 後ろから貪欲
j = copy.copy(k)
i = n-1
while j > 0:
if s[i] == "o":
back.append(i)
i -= c+1
... | [
"call.arguments.change"
] | 493,819 | 493,820 | u969639186 | python |
p02721 | n,k,c=map(int,input().split())
s=input()
l=len(s)
cand=[]
for i in range(l):
if s[i]=='o':
cand.append(i+1)
cnt1=[0]*(n+2)
cnt2=[0]*(n+2)
prev=0
cnt=0
for i in range(l):
if s[i]=='o' and i>=prev:
cnt+=1
cnt1[i+1]=cnt
prev=i+(c+1)
else:
cnt1[i+1]=cnt
prev=l
cnt=0
for i in range(l-1,-1,-1):
if... | n,k,c=map(int,input().split())
s=input()
l=len(s)
cand=[]
for i in range(l):
if s[i]=='o':
cand.append(i+1)
cnt1=[0]*(n+2)
cnt2=[0]*(n+2)
prev=0
cnt=0
for i in range(l):
if s[i]=='o' and i>=prev:
cnt+=1
cnt1[i+1]=cnt
prev=i+(c+1)
else:
cnt1[i+1]=cnt
prev=l
cnt=0
for i in range(l-1,-1,-1):
if... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 493,830 | 493,831 | u163320134 | python |
p02721 | n,k,c = map(int,input().split())
s = input()
frt = [0]*n
bck = [0]*n
cnt = 0
cntb = 0
prv = 0
prvb = 0
st = set()
stb = set()
for i in range(n):
if cnt == 0 and s[i] == "o":
cnt += 1
frt[i] = 1
prv = i
st.add(i)
elif i-prv > c and s[i] == "o":
cnt += 1
frt[i] = cnt
prv = i
st.add(i)
... | n,k,c = map(int,input().split())
s = input()
frt = [0]*n
bck = [0]*n
cnt = 0
cntb = 0
prv = 0
prvb = 0
st = set()
stb = set()
for i in range(n):
if cnt == 0 and s[i] == "o":
cnt += 1
frt[i] = 1
prv = i
st.add(i)
elif i-prv > c and s[i] == "o":
cnt += 1
frt[i] = cnt
prv = i
st.add(i)
... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.variable.change"
] | 493,876 | 493,877 | u905582793 | python |
p02721 | n,k,c = map(int,input().split())
sl = list(input())
# 前貪欲
ansl = []
before = -float("inf")
for idx,s in enumerate(sl):
if s == "o" and before + c < idx:
before = idx
ansl.append(idx)
if len(ansl) > k:
print()
exit()
# 後貪欲
ansl2 = []
before = -float("inf")
for idx,s in enumerate(sl[::-1]):
... | n,k,c = map(int,input().split())
sl = list(input())
# 前貪欲
ansl = []
before = -float("inf")
for idx,s in enumerate(sl):
if s == "o" and before + c < idx:
before = idx
ansl.append(idx)
if len(ansl) > k:
print()
exit()
# 後貪欲
ansl2 = []
before = -float("inf")
for idx,s in enumerate(sl[::-1]):
... | [
"call.add",
"call.arguments.change"
] | 493,884 | 493,885 | u683134447 | python |
p02721 | N, K, C = map(int,input().split())
S = list(input())
A = list()
B = list()
i = 0
num = 0
while num < K:
if S[i] == "o":
A.append(i)
num += 1
i += 3
i += 1
i = len(S)-1
num = 0
while num < K:
if S[i] == "o":
B.append(i)
num+=1
i -= 3
i -= 1
B.sort()
for i,j in zip(A,B):
if i == j:
... | N, K, C = map(int,input().split())
S = list(input())
A = list()
B = list()
i = 0
num = 0
while num < K:
if S[i] == "o":
A.append(i)
num += 1
i += C
i += 1
i = len(S)-1
num = 0
while num < K:
if S[i] == "o":
B.append(i)
num+=1
i -= C
i -= 1
B.sort()
for i,j in zip(A,B):
if i == j:
... | [
"identifier.replace.add",
"literal.replace.remove"
] | 493,902 | 493,903 | u100277898 | python |
p02721 | def main():
n,k,c=map(int,input().split())
S=input()
l1=[[0,0] for _ in range(n)]
l2=[0]*n
memo=[0]*n
x=0
for i in range(n):
if S[i]=="o" and memo[i]==0:
x+=1
l1[i][0]=x
l1[i][1]=i+c+1
for j in range(i,i+c+1):
if j<n:
... | def main():
n,k,c=map(int,input().split())
S=input()
l1=[[0,0] for _ in range(n)]
l2=[0]*n
memo=[0]*n
x=0
for i in range(n):
if S[i]=="o" and memo[i]==0:
x+=1
l1[i][0]=x
l1[i][1]=i+c+1
for j in range(i,i+c+1):
if j<n:
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"literal.number.integer.change",
"variable_access.subscript.index.change"
] | 493,925 | 493,924 | u798316285 | python |
p02721 | n, k, c = map(int, input().split())
s = list(input())
l = [0 for _ in range(n + 1)]
prev = -c
for i in range(1, n + 1):
l[i] = l[i - 1]
if prev + c < i and s[i - 1] == 'o':
l[i] += 1
prev = i
r = [0 for _ in range(n + 1)]
prev = n + c
for i in range(n - 1, -1, -1):
r[i] = r[i + 1]
if i ... | n, k, c = map(int, input().split())
s = list(input())
l = [0 for _ in range(n + 1)]
prev = -c
for i in range(1, n + 1):
l[i] = l[i - 1]
if prev + c < i and s[i - 1] == 'o':
l[i] += 1
prev = i
r = [0 for _ in range(n + 1)]
prev = n + c
for i in range(n - 1, -1, -1):
r[i] = r[i + 1]
if i ... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 493,937 | 493,938 | u872191059 | python |
p02722 | N = int(input())
ans = set()
def check(N, k):
if k<2:
return False
N //= k
while N:
if (N-1)%k==0:
return True
if N%k:
return False
N //= k
for k in range(1, int(N**0.5)+1):
if (N-1)%k==0:
ans.add(k)
ans.add((N-1)//k)
if N%k==... | N = int(input())
ans = set()
def check(N, k):
if k<2:
return False
N //= k
while N:
if (N-1)%k==0:
return True
if N%k:
return False
N //= k
for k in range(1, int(N**0.5)+1):
if (N-1)%k==0:
ans.add(k)
ans.add((N-1)//k)
if N%k==... | [
"identifier.change",
"call.arguments.change"
] | 493,957 | 493,958 | u690536347 | python |
p02722 | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
import bisect
from collections import deque
from math import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Functions... | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
import bisect
from collections import deque
from math import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Functions... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.break.add"
] | 493,961 | 493,962 | u493130708 | python |
p02722 | def check(n, i):
while n >= i and n % i == 0:
n //= i
return n % i == 1
def main():
N = int(input())
i = 2
r = set()
while i * i <= N:
if N % i == 0:
if check(N, i):
r.add(i)
if check(N, N // i):
r.add(N // i)
elif ... | def check(n, i):
while n >= i and n % i == 0:
n //= i
return n % i == 1
def main():
N = int(input())
i = 2
r = set()
while i * i <= N:
if N % i == 0:
if check(N, i):
r.add(i)
if check(N, N // i):
r.add(N // i)
elif ... | [
"control_flow.branch.if.add"
] | 493,965 | 493,966 | u858742833 | python |
p02722 | n = int(input())
# 例外処理
if n == 2:
print(0)
exit()
if n == 3:
print(1)
exit()
# n % k = 1 の数
m = n - 1
i = 2
ans = 1
while i * i <= m:
if m % i == 0:
num = 1
while m % i == 0:
num += 1
m //= i
ans *= num
i = i + 1
if m != 1:
ans *= 2
ans -= 1... | n = int(input())
# 例外処理
if n == 2:
print(1)
exit()
if n == 3:
print(2)
exit()
# n % k = 1 の数
m = n - 1
i = 2
ans = 1
while i * i <= m:
if m % i == 0:
num = 1
while m % i == 0:
num += 1
m //= i
ans *= num
i = i + 1
if m != 1:
ans *= 2
ans -= 1... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 493,999 | 494,000 | u070201429 | python |
p02722 | N = int(input())
def divisor(N):
ret = []
for i in range(1, int(N**0.5)+1):
if N % i == 0:
ret.append(i)
if N // i != i:
ret.append(N//i)
return ret
div_N = divisor(N)
div_N_1 = divisor(N-1)
ans = 0
for k in div_N[1:]:
n = N
while n % k == 0:
... | N = int(input())
def divisor(N):
ret = []
for i in range(1, int(N**0.5)+1):
if N % i == 0:
ret.append(i)
if N // i != i:
ret.append(N//i)
return ret
div_N = divisor(N)
div_N_1 = divisor(N-1)
ans = 0
for k in div_N[1:]:
n = N
while n % k == 0:
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 494,029 | 494,030 | u223663729 | python |
p02722 | N = int(input())
def divisor(N):
ret = []
for i in range(1, int(N**0.5)):
if N % i == 0:
ret.append(i)
if N // i != i:
ret.append(N//i)
return ret
div_N = divisor(N)
div_N_1 = divisor(N-1)
ans = 0
for k in div_N[1:]:
n = N
while n % k == 0:
... | N = int(input())
def divisor(N):
ret = []
for i in range(1, int(N**0.5)+1):
if N % i == 0:
ret.append(i)
if N // i != i:
ret.append(N//i)
return ret
div_N = divisor(N)
div_N_1 = divisor(N-1)
ans = 0
for k in div_N[1:]:
n = N
while n % k == 0:
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 494,031 | 494,030 | u223663729 | python |
p02722 | N = int(input())
cnt = 2
ret = []
for i in range(2, int(N**0.5)+1):
if N % i == 0:
k = N//i
while k % i == 0:
k //= i
if k % i == 1:
cnt += 1
if N // i != i:
j = N // i
k = i
while k % j == 0:
k //= j
... | N = int(input())
cnt = 2 if N > 2 else 1
ret = []
for i in range(2, int(N**0.5)+1):
if N % i == 0:
k = N//i
while k % i == 0:
k //= i
if k % i == 1:
cnt += 1
if N // i != i:
j = N // i
k = i
while k % j == 0:
... | [] | 494,032 | 494,033 | u223663729 | python |
p02722 | import math
N = int(input())
if N == 2:
print(2)
else:
ans = [N-1,N]
#N-1
for i in range(2,int(math.sqrt(N-1)+1)):
if (N-1) % i == 0:
ans.append(i)
if i != (N-1)//i:
ans.append((N-1)//i)
#N
for j in range(2,int(math.sqrt(N))+1):
if N % j ... | import math
N = int(input())
if N == 2:
print(1)
else:
ans = [N-1,N]
#N-1
for i in range(2,int(math.sqrt(N-1)+1)):
if (N-1) % i == 0:
ans.append(i)
if i != (N-1)//i:
ans.append((N-1)//i)
#N
for j in range(2,int(math.sqrt(N))+1):
if N % j ... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,038 | 494,039 | u231189826 | python |
p02722 | from copy import deepcopy
# 約数を全列挙する関数
def make_divisors(n):
divisors = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
divisors.sort()
return divisors
N0 = int(input())
ans = 0
# N = K^... | from copy import deepcopy
# 約数を全列挙する関数
def make_divisors(n):
divisors = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
divisors.sort()
return divisors
N0 = int(input())
ans = 0
# N = K^... | [
"call.remove"
] | 494,045 | 494,046 | u767664985 | python |
p02722 | import sys
input = lambda: sys.stdin.readline().rstrip()
N = int(input())
div = []
ans = 0
for i in range(1, int(N**0.5)+1):
if N % i == 0:
div.append(i)
if i != N // i:
div.append(N//i)
for d in div:
if d == 1: continue
tmp = N
while tmp % d == 0:
tmp //= d
i... | import sys
input = lambda: sys.stdin.readline().rstrip()
N = int(input())
div = []
ans = 0
for i in range(1, int(N**0.5)+1):
if N % i == 0:
div.append(i)
if i != N // i:
div.append(N//i)
for d in div:
if d == 1: continue
tmp = N
while tmp % d == 0:
tmp //= d
i... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 494,063 | 494,064 | u836939578 | python |
p02722 | N = int(input())
import math
ans = []
l = int(math.log2(N))
for i in range(1,l+1):
if round(N**(1/i))**i==N:
ans.append(round(N**(1/i)))
for i in range(2,round((N-1)**0.5)+1):
if (N-1)%i == 0:
ans.append(i)
if (N-1)//i != i:
ans.append((N-1)//i)
ans.append(N-1)
for i in range(2,round(N**0.5)+1)... | N = int(input())
import math
ans = []
l = int(math.log2(N))
for i in range(1,l+1):
if round(N**(1/i))**i==N:
ans.append(round(N**(1/i)))
for i in range(2,round((N-1)**0.5)+1):
if (N-1)%i == 0:
ans.append(i)
if (N-1)//i != i:
ans.append((N-1)//i)
if N>2:
ans.append(N-1)
for i in range(2,round(... | [
"control_flow.branch.if.add"
] | 494,090 | 494,089 | u678167152 | python |
p02722 | N = int(input())
divisor = set([N, N - 1])
x = N
for i in range(2, int(x ** 0.5) + 1):
z = x
while z % i == 0:
z //= i
if z % i == 1:
divisor.add(i)
if i == x // i:
continue
z = x
while z % (x // i) == 0:
z //= (x // i)
if z % (x // i) == 1:... | N = int(input())
divisor = set([N, N - 1])
x = N
for i in range(2, int(x ** 0.5) + 1):
z = x
while z % i == 0:
z //= i
if z % i == 1:
divisor.add(i)
if i == x // i:
continue
z = x
while z % (x // i) == 0:
z //= (x // i)
if z % (x // i) == 1:... | [] | 494,099 | 494,100 | u057109575 | python |
p02722 | N = int(input())
if N == 2:
print(0)
exit()
S = set([N-1])
lst = [N]
i = 2
while i*i <= N-1:
if (N-1) % i == 0:
S.add(i)
S.add((N-1)//i)
i += 1
i = 2
while i*i < N:
if N % i == 0:
lst.append(i)
lst.append(N//i)
i += 1
if i*i == N:
lst.append(i)
lst.sort()
for l in lst:
if... | N = int(input())
if N == 2:
print(1)
exit()
S = set([N-1])
lst = [N]
i = 2
while i*i <= N-1:
if (N-1) % i == 0:
S.add(i)
S.add((N-1)//i)
i += 1
i = 2
while i*i < N:
if N % i == 0:
lst.append(i)
lst.append(N//i)
i += 1
if i*i == N:
lst.append(i)
lst.sort()
for l in lst:
if... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,101 | 494,102 | u625046108 | python |
p02722 | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
def input():
return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
return random.randint(ran1,... | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
def input():
return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
return random.randint(ran1,... | [
"call.remove"
] | 494,105 | 494,106 | u145231176 | python |
p02722 | N = int(input())
if N == 2:
print(1)
exit()
ans = 0
def factorization(n):
lis = []
if n % 2 == 0:
c = 0
while n%2 == 0:
n //= 2
c += 1
lis.append([2, c])
k = 3
while k*k <= n:
if n%k == 0:
c = 0
while n%k == 0:
n //= k
c += 1
lis.append([k, c... | N = int(input())
if N == 2:
print(1)
exit()
ans = 0
def factorization(n):
lis = []
if n % 2 == 0:
c = 0
while n%2 == 0:
n //= 2
c += 1
lis.append([2, c])
k = 3
while k*k <= n:
if n%k == 0:
c = 0
while n%k == 0:
n //= k
c += 1
lis.append([k, c... | [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 494,111 | 494,112 | u627600101 | python |
p02722 | N = int(input())
A = []
B = []
for i in range(2,int(N**0.5)+1):
if N%i==0:
A.append(i)
A.append(N//i)
if (N-1)%i==0:
B.append(i)
B.append((N-1)//i)
A.append(N)
B.append(N-1)
A = sorted(A)
for a in A:
m = 1
while True:
if a**m==N:
B.append(a)
... | N = int(input())
A = []
B = []
for i in range(2,int(N**0.5)+1):
if N%i==0:
A.append(i)
A.append(N//i)
if (N-1)%i==0:
B.append(i)
B.append((N-1)//i)
A.append(N)
if N>2:
B.append(N-1)
A = sorted(A)
for a in A:
m = 1
while True:
if a**m==N:
B.append(a... | [
"control_flow.branch.if.add"
] | 494,119 | 494,120 | u644907318 | python |
p02722 |
def resolve():
def make_divisors(n):
divisors = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
# divisors.append((i, n // i)) # [(1,max), (2, max-1)]
divisors += [i,n // i] # [1,2,3,5]
divisors.sort()
return divisors
N = int... |
def resolve():
def make_divisors(n):
divisors = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
# divisors.append((i, n // i)) # [(1,max), (2, max-1)]
divisors += [i,n // i] # [1,2,3,5]
divisors.sort()
return divisors
N = int... | [
"call.add",
"call.arguments.change"
] | 494,141 | 494,142 | u581187895 | python |
p02722 | N = int(input())
def cd(n):
ls = []
for i in range(1,int(n**(1/2))+1):
if n % i == 0:
ls += [i, n//i]
return ls
ans = len(cd(N-1)) - 1
for j in cd(N):
a = N
if not j == 1:
while a % j == 0:
a //= j
if a % j == 1:
ans += 1
print(ans) | N = int(input())
def cd(n):
ls = []
for i in range(1,int(n**(1/2))+1):
if n % i == 0:
ls += [i, n//i]
return ls
ans = len(set(cd(N-1))) - 1
for j in set(cd(N)):
a = N
if not j == 1:
while a % j == 0:
a //= j
if a % j == 1:
ans += 1
print(ans) | [
"call.arguments.add",
"call.arguments.change",
"call.add"
] | 494,143 | 494,144 | u112629957 | python |
p02722 | import sys
def solve():
input = sys.stdin.readline
N = int(input())
if N == 2: print(1)
else:
K = {N, N-1}
for i in range(2, N + 1):
if i ** 2 > N: break
if N % i == 0:
k = N
while k % i == 0:
k //= i
... | import sys
def solve():
input = sys.stdin.readline
N = int(input())
if N == 2: print(1)
else:
K = {N, N-1}
for i in range(2, N + 1):
if i ** 2 > N: break
if N % i == 0:
k = N
while k % i == 0:
k //= i
... | [
"identifier.change"
] | 494,157 | 494,158 | u608088992 | python |
p02722 | def make_divisors(n):
lower_divisors , upper_divisors = [], []
i = 1
while i*i <= n:
if n % i == 0:
lower_divisors.append(i)
if i != n // i:
upper_divisors.append(n//i)
i += 1
return lower_divisors + upper_divisors[::-1]
n = int(input())
tmp = ... | def make_divisors(n):
lower_divisors, upper_divisors = [], []
i = 1
while i*i <= n:
if n % i == 0:
lower_divisors.append(i)
if i != n // i:
upper_divisors.append(n//i)
i += 1
return lower_divisors + upper_divisors[::-1]
n = int(input())
tmp = n ... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 494,161 | 494,162 | u550294762 | python |
p02722 | import math
import copy
def prime_factorize(n):
a = [n]
for i in range(2, math.floor(n ** 0.5) + 1):
if n % i == 0:
a.append(i)
if n // i != i:
a.append(n // i)
return a
N = int(input())
prime_n = prime_factorize(N)
prime_n_1 = prime_factorize(N - 1)
ans = 0... | import math
import copy
def prime_factorize(n):
a = [n]
for i in range(2, math.floor(n ** 0.5) + 1):
if n % i == 0:
a.append(i)
if n // i != i:
a.append(n // i)
return a
N = int(input())
prime_n = prime_factorize(N)
prime_n_1 = prime_factorize(N - 1)
ans = 0... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 494,165 | 494,166 | u091051505 | python |
p02722 | import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
def sieve_of_eratosthenes(n):
if not isin... | import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
def sieve_of_eratosthenes(n):
if not isinstance(... | [] | 494,169 | 494,170 | u928784113 | python |
p02722 | def divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n%i == 0:
divisors.append(i)
if i != n//i:
divisors.append(n//i)
return sorted(divisors)
n = int(input())
ans = len(divisors(n-1))-1;
for k in divisors(N)[1:]:
boz = n
while (n % k ==... | def divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n%i == 0:
divisors.append(i)
if i != n//i:
divisors.append(n//i)
return sorted(divisors)
n = int(input())
ans = len(divisors(n-1))-1;
for k in divisors(n)[1:]:
boz = n
while (n % k ==... | [
"identifier.change",
"call.arguments.change"
] | 494,204 | 494,205 | u110615365 | python |
p02722 | n = int(input())
def divisior(n):
a = []
i = 1
while (i*i <= n):
if n%i == 0:
a.append(i)
if (i*i != n): a.append(n//i)
i += 1
return a
ans = 0
a = divisior(n).sort()
for x in a[1:]:
tmp = n
while (tmp%x == 0): tmp = tmp//x
if (tmp%x == 1) : ans +=... | n = int(input())
def divisior(n):
a = []
i = 1
while (i*i <= n):
if n%i == 0:
a.append(i)
if (i*i != n): a.append(n//i)
i += 1
return a
ans = 0
a = divisior(n)
for x in a[1:]:
tmp = n
while (tmp%x == 0): tmp = tmp//x
if (tmp%x == 1) : ans += 1
b = ... | [
"call.remove"
] | 494,226 | 494,227 | u904547029 | python |
p02722 | def divisors(n):
small = []
large = []
i = 1
while i * i <= n:
if not n % i:
small.append(i)
large.append(n // i)
i += 1
if small[-1] == large[-1]:
large.pop()
return small + large[::-1]
n = int(input())
res = set(divisors(n - 1))
res.remove(1)
for d in divisors(n):
if d == 1:
... | def divisors(n):
small = []
large = []
i = 1
while i * i <= n:
if not n % i:
small.append(i)
large.append(n // i)
i += 1
if small[-1] == large[-1]:
large.pop()
return small + large[::-1]
n = int(input())
res = set(divisors(n - 1))
res.remove(1)
for d in divisors(n):
if d == 1:
... | [
"identifier.change"
] | 494,242 | 494,243 | u440566786 | python |
p02722 | def divisors(n):
small = []
large = []
i = 1
while i * i <= n:
if not n % i:
small.append(i)
large.append(n // i)
i += 1
if small[-1] == large[-1]:
large.pop()
return small + large[::-1]
n = int(input())
res = set(divisors(n - 1))
res.remove(1)
for d in divisor(n):
if d == 1:
... | def divisors(n):
small = []
large = []
i = 1
while i * i <= n:
if not n % i:
small.append(i)
large.append(n // i)
i += 1
if small[-1] == large[-1]:
large.pop()
return small + large[::-1]
n = int(input())
res = set(divisors(n - 1))
res.remove(1)
for d in divisors(n):
if d == 1:
... | [
"identifier.change",
"call.function.change"
] | 494,244 | 494,243 | u440566786 | python |
p02722 | def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
return divisors
n=int(input())
l1=make_divisors(n-1)
l2=make_divisors(n)[2:]
for i in l2:
j=n/i
while j%i==0:
... | def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
return divisors
n=int(input())
l1=make_divisors(n-1)
l2=make_divisors(n)[2:]
for i in l2:
j=n/i
while j%i==0:
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.arguments.change"
] | 494,245 | 494,246 | u480264129 | python |
p02722 | # 素因数分解
N=int(input())
cand=[]
def check(N0,K0):
if N0%K0==0:
return check(int(N0/K0),K0)
elif N0%K0==1:
return 1
else:
return 0
def check0(N0,K0):
while N0%K0==0:
N0=int(N0/K0)
if N0%K0==1:
return 1
else:
return 0
# N-1の約数の数
for i in range(2,i... | # 素因数分解
N=int(input())
cand=[]
def check(N0,K0):
if N0%K0==0:
return check(int(N0/K0),K0)
elif N0%K0==1:
return 1
else:
return 0
def check0(N0,K0):
while N0%K0==0:
N0=int(N0/K0)
if N0%K0==1:
return 1
else:
return 0
# N-1の約数の数
for i in range(2,i... | [
"call.remove"
] | 494,247 | 494,248 | u008079810 | python |
p02722 | n = int(input())
a = [n]
if n != 2:
a.append(n - 1)
def div_(N, k):
while N % k == 0:
N /= k
if N % k == 1:
a.append(k)
for k in range(2, int(n ** 0.5) + 1):
if n % k == 0:
div_(n,k)
if k != n / k:
div_(n, n // k)
if (n - 1) % k == 0:
a.append(k... | n = int(input())
a = [n]
if n != 2:
a.append(n - 1)
def div_(N, k):
while N % k == 0:
N /= k
if N % k == 1:
a.append(k)
for k in range(2, int(n ** 0.5) + 1):
if n % k == 0:
div_(n,k)
if k != n / k:
div_(n, n // k)
if (n - 1) % k == 0:
a.append(k... | [
"call.remove"
] | 494,249 | 494,250 | u471641802 | python |
p02722 | N = int(input())
divisor = [N]
ans = 0
#Nの約数の列挙
for i in range(2,N+1,1):
if i*i < N:
if N % i == 0:
divisor.append(i)
divisor.append(N//i)
elif i*i == N:
divisor.append(i)
else:
break
#N-1の約数の列挙
yakusuuu = [N-1]
for i in range(2,N,1):
if i*i < (N-1):
... | N = int(input())
divisor = [N]
ans = 0
#Nの約数の列挙
for i in range(2,N+1,1):
if i*i < N:
if N % i == 0:
divisor.append(i)
divisor.append(N//i)
elif i*i == N:
divisor.append(i)
else:
break
#N-1の約数の列挙
yakusuuu = [N-1]
for i in range(2,N,1):
if i*i < (N-1):
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 494,263 | 494,264 | u363074342 | python |
p02722 | n=int(input())
ans=0
nmcc=0
i=1
d=[]
while i*i<n:
if n%i==0:
d.append(i)
if i*i!=n:
d.append(n//i)
i+=1
for i in d:
if i==1:
continue
tmp=n
while tmp%i==0:
tmp//=i
tmp%=i
if tmp==1:
ans+=1
i=1
while i*i<(n-1):
if (n-1)%i==0:
nmcc+=1
if i*i!=n-1:
nmcc+=1
i+=1
nm... | n=int(input())
ans=0
nmcc=0
i=1
d=[]
while i*i<=n:
if n%i==0:
d.append(i)
if i*i!=n:
d.append(n//i)
i+=1
for i in d:
if i==1:
continue
tmp=n
while tmp%i==0:
tmp//=i
tmp%=i
if tmp==1:
ans+=1
i=1
while i*i<=(n-1):
if (n-1)%i==0:
nmcc+=1
if i*i!=n-1:
nmcc+=1
i+=1
... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 494,271 | 494,272 | u060432908 | python |
p02722 | #coding:utf-8
import sys,os
from collections import defaultdict, deque
from math import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
input = la... | #coding:utf-8
import sys,os
from collections import defaultdict, deque
from math import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
input = la... | [
"identifier.change",
"call.function.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 494,291 | 494,292 | u043048943 | python |
p02722 | #coding:utf-8
import sys,os
from collections import defaultdict, deque
from math import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
input = la... | #coding:utf-8
import sys,os
from collections import defaultdict, deque
from math import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
input = la... | [
"identifier.change",
"call.function.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"function.return_value.change",
"call.add"
] | 494,293 | 494,292 | u043048943 | python |
p02722 | def make_divisors(n):
lsls=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
lsls.append(i)
if i!=n//i:
lsls.append(n//i)
lsls.sort()
return lsls
N=int(input())
ans=1
for K in range(2,int(N**0.5)+2):
num=N
while num%K==0:
num//=K
if num>... | def make_divisors(n):
lsls=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
lsls.append(i)
if i!=n//i:
lsls.append(n//i)
lsls.sort()
return lsls
N=int(input())
ans=1
for K in range(2,min(N,int(N**0.5)+2)):
num=N
while num%K==0:
num//=K
... | [
"call.arguments.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 494,301 | 494,302 | u819048695 | python |
p02722 | def make_divisors(n):
divisors = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
return divisors
def main():
n = int(input())
# 1回も割り算しない場合は n mod k = 1でkは(n-1)の約数
ans = len(make_... | def make_divisors(n):
divisors = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
return divisors
def main():
n = int(input())
# 1回も割り算しない場合は n mod k = 1でkは(n-1)の約数
ans = len(make_... | [
"assignment.change"
] | 494,331 | 494,332 | u281610856 | python |
p02722 | def gen_divs(n):
divs = []
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
divs.append(i)
if i != n // i:
divs.append(n // i)
return divs
def divthensub(v, div):
while v % div == 0:
v //= div
if v % div == 1:
return True
else... | def gen_divs(n):
divs = []
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
divs.append(i)
if i != n // i:
divs.append(n // i)
return divs
def divthensub(v, div):
while v % div == 0:
v //= div
if v % div == 1:
return True
else... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,350 | 494,351 | u888092736 | python |
p02722 | import numpy as np
N = int(input())
def divisor(N):
x = np.arange(1, int(N**(1/2)), dtype=np.int64)
div = set(x[N % x == 0])
return div | set(N // x for x in div)
cand = divisor(N) | divisor(N - 1)
def test(N, K):
if K == 1:
return False
while N % K == 0:
N //= K
re... | import numpy as np
N = int(input())
def divisor(N):
x = np.arange(1, int(N**(1/2))+1, dtype=np.int64)
div = set(x[N % x == 0])
return div | set(N // x for x in div)
cand = divisor(N) | divisor(N - 1)
def test(N, K):
if K == 1:
return False
while N % K == 0:
N //= K
... | [
"assignment.change"
] | 494,363 | 494,364 | u078932560 | python |
p02722 | import math
N = int(input())
nn = int(math.sqrt(N))
# nn = int(N / 2)
ans = 2
for x in range(2,nn+1):
if N % x == 1:
ans += 1
continue
if N % x > 1:
continue
tmp = N
while tmp > x:
tmp = tmp / x
if tmp % x == 1 :
ans += 1
break
... | import math
N = int(input())
nn = int(math.sqrt(N))
# nn = int(N / 2)
ans = 1
for x in range(2,nn+1):
if N % x == 1:
ans += 1
continue
if N % x > 1:
continue
tmp = N
while tmp > x:
tmp = tmp / x
if tmp % x == 1 :
ans += 1
break
... | [
"literal.number.integer.change",
"assignment.value.change"
] | 494,377 | 494,378 | u192042624 | python |
p02722 | from math import sqrt, ceil
def factors_set(number):
factors = set()
for i in range(1, ceil(sqrt(number))):
if number % i == 0:
factors.add(i)
factors.add(number // i)
return factors
N = int(input())
Ks = factors_set(N-1) | factors_set(N)
Ks.remove(1)
ans = 0
for K in Ks:... | from math import sqrt, ceil
def factors_set(number):
factors = set()
for i in range(1, ceil(sqrt(number))+1):
if number % i == 0:
factors.add(i)
factors.add(number // i)
return factors
N = int(input())
Ks = factors_set(N-1) | factors_set(N)
Ks.remove(1)
ans = 0
for K in K... | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 494,385 | 494,386 | u034128150 | python |
p02722 | import math
N = int(input())
# 割れるだけ割る
KMAX = math.floor(math.sqrt(N)) + 1
Kn = [N] # N の約数であるような K
Kn1 = [N-1] # N - 1 の約数であるような K
# N の約数であるような K (Kn)を求める
for K in range(2,KMAX):
if N % K == 0:
Kn.append(K)
tmp = N//K
if tmp == K:
continue
Kn.append(N//K)
... | import math
N = int(input())
# 割れるだけ割る
KMAX = math.floor(math.sqrt(N)) + 1
Kn = [N] # N の約数であるような K
Kn1 = [N-1] # N - 1 の約数であるような K
# N の約数であるような K (Kn)を求める
for K in range(2,KMAX):
if N % K == 0:
Kn.append(K)
tmp = N//K
if tmp == K:
continue
Kn.append(N//K)
... | [
"control_flow.branch.if.add"
] | 494,393 | 494,394 | u726285999 | python |
p02722 | def calc_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
def div_or_sub(n, k):
while k <= n:
if n % k == 0:
n //= ... | def calc_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
def div_or_sub(n, k):
while k <= n:
if n % k == 0:
n //= ... | [
"expression.operator.change"
] | 494,397 | 494,396 | u347600233 | python |
p02722 | def calc_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
def div_or_sub(n, k):
while k <= n:
if n % k == 0:
n //= ... | def calc_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
def div_or_sub(n, k):
while k <= n:
if n % k == 0:
n //= ... | [] | 494,398 | 494,396 | u347600233 | python |
p02722 | def calc_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
def div_or_sub(n, k):
while k <= n:
if n % k == 0:
n //= ... | def calc_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
def div_or_sub(n, k):
while k <= n:
if n % k == 0:
n //= ... | [
"assignment.change"
] | 494,399 | 494,396 | u347600233 | python |
p02722 | import math
N = int(input())
ans = 0
for i in range(2, N + 1):
if i * i > N:
if N == 2:
ans += 1
else:
ans += 1
break
if (N - 1) % i == 0:
ans += 1
if (N - 1) // i != i:
ans += 1
elif N % i == 0:
cand = [i]
if N /... | import math
N = int(input())
ans = 0
for i in range(2, N + 1):
if i * i > N:
if N == 2:
ans += 1
else:
ans += 2
break
if (N - 1) % i == 0:
ans += 1
if (N - 1) // i != i:
ans += 1
elif N % i == 0:
cand = [i]
if N /... | [
"literal.number.integer.change"
] | 494,400 | 494,401 | u577170763 | python |
p02722 | def check(i):
tot=k
while(tot%i==0):
tot//=i
if(tot%i==1):
setl.add(i)
import math
k=int(input())
if(k==2):
print(2)
exit()
setl = set()
setl.add(k); setl.add(k-1)
for x in range(2,int(math.sqrt(k))+1):
check(x)
check(k//x)
print(len(setl)) | def check(i):
tot=k
while(tot%i==0):
tot//=i
if(tot%i==1):
setl.add(i)
import math
k=int(input())
if(k==2):
print(1)
exit()
setl = set()
setl.add(k); setl.add(k-1)
for x in range(2,int(math.sqrt(k))+1):
check(x)
check(k//x)
print(len(setl)) | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,417 | 494,418 | u251899209 | python |
p02722 | n = int(input())
k = 2
count = set()
while k * k <= n:
if n % k == 1:
count.add(k)
count.add((n-1)//k)
elif n % k == 0:
n_copy = n
while n_copy % k == 0:
n_copy //= k
if n_copy % k == 1:
count.add(k)
k += 1
count.add(n-1)
count.add(n)
print(len... | n = int(input())
k = 2
count = set()
while k * k <= n:
if n % k == 1:
count.add(k)
count.add((n-1)//k)
elif n % k == 0:
n_copy = n
while n_copy % k == 0:
n_copy //= k
if n_copy % k == 1:
count.add(k)
k += 1
if n > 2:
count.add(n-1)
count.ad... | [
"control_flow.branch.if.add"
] | 494,419 | 494,420 | u933929042 | python |
p02722 | import math
INT_MAX=10**18+7
MOD=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)]
#################################################################################
n=int(input())
def ... | import math
INT_MAX=10**18+7
MOD=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)]
#################################################################################
n=int(input())
def ... | [
"expression.operation.binary.remove"
] | 494,429 | 494,430 | u861075868 | python |
p02722 |
import sys
sys.setrecursionlimit(10**9)
N = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
ds = set(make_divi... |
import sys
sys.setrecursionlimit(10**9)
N = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
ds = set(make_divi... | [
"expression.operator.arithmetic.change",
"call.arguments.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 494,441 | 494,442 | u633051991 | python |
p02722 | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | [
"control_flow.branch.if.condition.change"
] | 494,457 | 494,458 | u423585790 | python |
p02722 | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"control_flow.branch.if.condition.change"
] | 494,459 | 494,458 | u423585790 | python |
p02722 | N = int(input())
#N = 6
def factorization(n):
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append([i, cnt])
if temp!=1:
arr.append([temp, 1])
... | N = int(input())
import itertools
#N = 6
def factorization(n):
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append([i, cnt])
if temp!=1:
arr.appen... | [] | 494,477 | 494,478 | u980322611 | python |
p02722 | a=int(input())
def div(n):
div=set()
for i in range(1, int(n**0.5)+1):
if n % i == 0:
div.add(i)
div.add(n//i)
if i != n // i:
div.add(i)
return div
s=list((div(a)|div(a-1))|div(a+1))
def x(n,k):
if k==1:
return False
else:
while n>1 an... | a=int(input())
def div(n):
div=set()
for i in range(1, int(n**0.5)+1):
if n % i == 0:
div.add(i)
div.add(n//i)
if i != n // i:
div.add(i)
return div
s=list((div(a)|div(a-1))|div(a+1))
def x(n,k):
if k==1:
return False
else:
while n>1 an... | [
"control_flow.loop.condition.change",
"literal.number.integer.change",
"assignment.value.change"
] | 494,491 | 494,492 | u769870836 | python |
p02722 | def divisor(x):
div = []
for i in range(1,int(x**0.5)+1):
if x%i == 0:
div.append(i)
if x != i*2: div.append(x//i)
return div
def calc(n,x):
if x==1: return n
while n>=x:
if n%x == 0:
n //= x
else:
n %= x
return n
n =... | def divisor(x):
div = []
for i in range(1,int(x**0.5)+1):
if x%i == 0:
div.append(i)
if x != i**2: div.append(x//i)
return div
def calc(n,x):
if x==1: return n
while n>=x:
if n%x == 0:
n //= x
else:
n %= x
return n
n ... | [
"control_flow.branch.if.condition.change"
] | 494,497 | 494,498 | u867320886 | python |
p02722 | def divisor(x):
div = []
for i in range(1,int(x**0.5)+1):
if x%i == 0:
div.append(i)
if x != i*2: div.append(x//i)
return div
def calc(n,x):
if x==1: return n
while n>x:
if n%x == 0:
n //= x
else:
n %= x
return n
n = ... | def divisor(x):
div = []
for i in range(1,int(x**0.5)+1):
if x%i == 0:
div.append(i)
if x != i**2: div.append(x//i)
return div
def calc(n,x):
if x==1: return n
while n>=x:
if n%x == 0:
n //= x
else:
n %= x
return n
n ... | [
"control_flow.branch.if.condition.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 494,499 | 494,498 | u867320886 | python |
p02722 | N = int(input())
def check(p):
_N = N
while _N%p == 0:
_N //= p
return (_N-1)%p == 0
n = int(N**0.5) + 1
P0 = set([N])
P1 = set([N-1])
for i in range(2, n+1):
if (N-1)%i == 0:
P1.add(i)
P1.add((N-1)//i)
if N%i == 0:
P0.add(i)
P0.add(N//i)
P2.discard(1)
P1.discard(1)
ans = len(P1)
for p ... | N = int(input())
def check(p):
_N = N
while _N%p == 0:
_N //= p
return (_N-1)%p == 0
n = int(N**0.5) + 1
P0 = set([N])
P1 = set([N-1])
for i in range(2, n+1):
if (N-1)%i == 0:
P1.add(i)
P1.add((N-1)//i)
if N%i == 0:
P0.add(i)
P0.add(N//i)
P0.discard(1)
P1.discard(1)
ans = len(P1)
for p ... | [
"identifier.change"
] | 494,510 | 494,511 | u922449550 | python |
p02722 | def divisors(n):
ret=[]
for i in range(2,int(n**0.5)+1):
if n%i==0:
ret.append(i)
if n//i!=i:
ret.append(n//i)
return ret
n=int(input())
divs1=divisors(n)
divs2=divisors(n-1)
cnt=len(divs2)-1
for val in divs1:
if val==1:
continue
tmp=n
while tmp%val==0:
tmp=tmp//val
if tmp... | def divisors(n):
ret=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
ret.append(i)
if n//i!=i:
ret.append(n//i)
return ret
n=int(input())
divs1=divisors(n)
divs2=divisors(n-1)
cnt=len(divs2)-1
for val in divs1:
if val==1:
continue
tmp=n
while tmp%val==0:
tmp=tmp//val
if tmp... | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change"
] | 494,524 | 494,525 | u163320134 | python |
p02722 | def divisors(n):
ret=[]
for i in range(2,int(n**0.5)+1):
if n%i==0:
ret.append(i)
if n//i!=i:
ret.append(n//i)
return ret
n=int(input())
divs1=divisors(n)
divs2=divisors(n-1)
cnt=len(divs2)
for val in divs1:
if val==1:
continue
tmp=n
while tmp%val==0:
tmp=tmp//val
if tmp%v... | def divisors(n):
ret=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
ret.append(i)
if n//i!=i:
ret.append(n//i)
return ret
n=int(input())
divs1=divisors(n)
divs2=divisors(n-1)
cnt=len(divs2)-1
for val in divs1:
if val==1:
continue
tmp=n
while tmp%val==0:
tmp=tmp//val
if tmp... | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change"
] | 494,526 | 494,525 | u163320134 | python |
p02722 | #!/usr/bin/env python3
import math
n = int(input())
if n == 2:
print(1)
exit()
# n-1の約数を全列挙か、n の約数を全部探索して、n//k*p = 1+k*qになるかを確かめる
def divisor(n):
res = [n]
for i in range(2,1+math.ceil(math.sqrt(n))):
if n % i == 0:
res.append(i)
if i != n//i:
res.append(n... | #!/usr/bin/env python3
import math
n = int(input())
if n == 2:
print(1)
exit()
# n-1の約数を全列挙か、n の約数を全部探索して、n//k*p = 1+k*qになるかを確かめる
def divisor(n):
res = [n]
for i in range(2,1+math.floor(math.sqrt(n))):
if n % i == 0:
res.append(i)
if i != n//i:
res.append(... | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 494,531 | 494,532 | u462329577 | python |
p02722 | #!/usr/bin/env python3
import math
n = int(input())
if n == 2:
print(1)
exit()
# n-1の約数を全列挙か、n の約数を全部探索して、n//k*p = 1+k*qになるかを確かめる
def divisor(n):
res = [n]
for i in range(2,math.ceil(math.sqrt(n))):
if n % i == 0:
res.append(i)
if i != n//i:
res.append(n//... | #!/usr/bin/env python3
import math
n = int(input())
if n == 2:
print(1)
exit()
# n-1の約数を全列挙か、n の約数を全部探索して、n//k*p = 1+k*qになるかを確かめる
def divisor(n):
res = [n]
for i in range(2,1+math.floor(math.sqrt(n))):
if n % i == 0:
res.append(i)
if i != n//i:
res.append(... | [
"misc.opposites",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 494,533 | 494,532 | u462329577 | python |
p02722 | import math
N = int(input())
cnt = 0
if N == 2:
print(2)
exit()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
re... | import math
N = int(input())
cnt = 0
if N == 2:
print(1)
exit()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
re... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,555 | 494,556 | u509405951 | python |
p02722 | import math
N = int(input())
cnt = 0
if N == 2:
print(1)
exit()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
res1 = ... | import math
N = int(input())
cnt = 0
if N == 2:
print(1)
exit()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
re... | [
"call.remove"
] | 494,557 | 494,556 | u509405951 | python |
p02722 | import math
N = int(input())
cnt = 0
if N == 2:
print(2)
exit()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
res1 = ... | import math
N = int(input())
cnt = 0
if N == 2:
print(1)
exit()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
re... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,558 | 494,556 | u509405951 | python |
p02722 | import sys
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
def divisor(n):
ass = []
for i in range(1, int(n**0.5)+1):
if n%i == 0:
ass... | import sys
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
def divisor(n):
ass = []
for i in range(1, int(n**0.5)+1):
if n%i == 0:
ass... | [
"expression.operation.binary.add"
] | 494,570 | 494,571 | u543954314 | python |
p02722 | N = int(input())
if N == 2:
print(1)
exit()
if N == 3:
print(2)
exit()
def yakusu(n):
rn = int(n ** 0.5)
ret = 2
for i in range(2, rn):
if n % i == 0:
ret += 2
if rn*rn == n:
ret += 1
return ret
#A = [True for i in range(10**6 + 1)]
ans = 1 # K = N
rn = int(N ** 0.5)
for i in range(2, rn+1):
if N % i... | N = int(input())
if N == 2:
print(1)
exit()
if N == 3:
print(2)
exit()
def yakusu(n):
rn = int(n ** 0.5)
ret = 2
for i in range(2, rn+1):
if n % i == 0:
ret += 2
if rn*rn == n:
ret -= 1
return ret
#A = [True for i in range(10**6 + 1)]
ans = 1 # K = N
rn = int(N ** 0.5)
for i in range(2, rn+1):
if N %... | [
"expression.operator.change"
] | 494,586 | 494,587 | u942033906 | python |
p02722 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
def make_divisors(n):
divisors = []
for i in range(2, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
n = int(input())
if n == 2:
prin... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
def make_divisors(n):
divisors = []
for i in range(2, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
n = int(input())
if n == 2:
prin... | [
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 494,603 | 494,604 | u190616335 | python |
p02722 | n=int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
d=make_divisors(n)[1:]
l=make_divisors(n-1)[1:]
ans=0
for i in d... | n=int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
d=make_divisors(n)[1:]
l=make_divisors(n-1)[1:]
ans=0
for i in d... | [
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 494,633 | 494,634 | u366959492 | python |
p02722 | n = int(input())
lst = set()
for i in range(2, int(n ** (1 / 2)) + 1):
k = i
while k <= n * i:
k *= i
if n % k == k // i:
lst.add(i)
break
for i in range(2, int(n ** (1 / 2)) + 1):
if n % i == 1:
lst.add(i)
lst.add((n - 1) // i)
lst.add(n - 1)
lst.add(n)
print(len(lst)) | n = int(input())
lst = set()
for i in range(2, int(n ** (1 / 2)) + 1):
k = i
while k <= n * i:
k *= i
if n % k == k // i:
lst.add(i)
break
for i in range(2, int(n ** (1 / 2)) + 1):
if n % i == 1:
lst.add(i)
lst.add((n - 1) // i)
if n > 2:
lst.add(n - 1)
lst.add(n)
print(len(lst)) | [
"control_flow.branch.if.add"
] | 494,643 | 494,644 | u671455949 | python |
p02722 | import math
N = int(input())
def yakusu(n):#約数列挙
list1 = []
list2 = []
for i in range(1, int(math.sqrt(n)) + 1):
if n % i == 0:
list1.append(i)
if i != n // i:
list2.append(n // i)
list2.reverse()
return list1 + list2
def A(x):
m = l1[len1 - i]
... | import math
N = int(input())
def yakusu(n):#約数列挙
list1 = []
list2 = []
for i in range(1, int(math.sqrt(n)) + 1):
if n % i == 0:
list1.append(i)
if i != n // i:
list2.append(n // i)
list2.reverse()
return list1 + list2
def A(x):
m = l1[len1 - i -... | [
"assignment.change"
] | 494,674 | 494,675 | u552290152 | python |
p02722 | #nの約数とn-1の約数全部愚直
n = int(input())
fct1 = []
fct2 = []
for i in range(1,int(n**(1/2))+10):
if n%i==0:
fct1.append(i)
fct2.append(n//i)
if (n-1)%i==0:
fct1.append(i)
fct2.append((n-1)//i)
fct = set(fct1+fct2)
if 1 in fct:
fct.remove(1)
ans = 0
for k in fct:
n2 = n
whil... | #nの約数とn-1の約数全部愚直
n = int(input())
fct1 = []
fct2 = []
for i in range(1,int(n**(1/2))+10):
if n%i==0:
fct1.append(i)
fct2.append(n//i)
if (n-1)%i==0:
fct1.append(i)
fct2.append((n-1)//i)
fct = set(fct1+fct2)
if 1 in fct:
fct.remove(1)
ans = 0
for k in fct:
n2 = n
whil... | [] | 494,686 | 494,687 | u520276780 | python |
p02723 | s=input()
if s[2] == s[3]:
if s[4] == s[5]:
print('Yes')
else:
print('No') | s=input()
if s[2] == s[3] and s[4] == s[5]:
print('Yes')
else:
print('No') | [] | 494,722 | 494,723 | u087118202 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.