original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j]<'.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | if s[j]<'.': | 10 | decision |
def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 48] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | if j < len(s) - 1 and s[j + 48] == 'S': | 14 | value |
def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j==0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | if j==0 and s[j - 1] == 'S': | 12 | decision |
def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 116] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | if s[j - 1] != '-' and s[j - 116] != '.': | 19 | value |
def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 0 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | def main():
n, k = map(int, input().split())
count = 0
rows_raw = []
table = []
for i in range(n):
s = input()
rows_raw.append(s)
for j in range(len(s)):
if s[j] == '.':
coef = 0
if j > 119 and s[j - 1] == 'S':
coef += 1
if j < len(s) - 1 and s[j + 1] == 'S':
coef += 1
table.append((i, j, coef))
if s[j] == 'S':
if j > 0:
if s[j - 1] != '-' and s[j - 1] != '.':
count += 1
if j < len(s) - 1:
if s[j + 1] != '-' and s[j + 1] != '.':
count += 1
table.sort(key=lambda x: x[2])
for i in range(k):
set_passenger(rows_raw, table[i][0], table[i][1])
count += table[i][2]
print(count)
for row in rows_raw:
print(row)
def set_passenger(rows_raw, i, j):
rows_raw[i] = rows_raw[i][:j] + 'x' + rows_raw[i][j + 1:]
if __name__ == "__main__":
main() | if j > 119 and s[j - 1] == 'S': | 12 | value |
x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
x += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | x += 1 | 9 | statement |
x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a|10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | return a % 10 == 7 or a|10 % 10 == 7 | 5 | operation |
x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10<7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | return a % 10 == 7 or a // 10 % 10<7 | 5 | decision |
x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm>0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | if mm>0: | 10 | decision |
x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10 == 7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | x = int(input())
hh, mm = map(int, input().split())
def lucky(a):
return a % 10<7 or a // 10 % 10 == 7
ans = 0
while not lucky(hh) and not lucky(mm):
mm -= x
ans += 1
if mm < 0:
mm += 60
hh -= 1
if hh < 0:
hh += 24
print(ans) | return a % 10<7 or a // 10 % 10 == 7 | 5 | decision |
import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a<=2**two_fact*3**three_fact):
count+=1;
print(count); | import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a>=2**two_fact*3**three_fact):
count+=1;
print(count); | if(a>=2**two_fact*3**three_fact): | 8 | decision |
import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a<=2**two_fact*3**three_fact):
count+=1;
print(count); | import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a<=2**two_fact*3|three_fact):
count+=1;
print(count); | if(a<=2**two_fact*3|three_fact): | 8 | operation |
import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a<=2**two_fact*3**three_fact):
count+=1;
print(count); | import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a>=2**two_fact*3**three_fact):
count+=1;
print(count); | if(a>=2**two_fact*3**three_fact): | 8 | decision |
import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a<=2**two_fact*3**three_fact):
count+=1;
print(count); | import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a>=2**two_fact*3**three_fact):
count+=1;
print(count); | if(a>=2**two_fact*3**three_fact): | 8 | decision |
import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a<=2**two_fact*3**three_fact):
count+=1;
print(count); | import math
def main():
a, b = map(int, input().split());
count=0;
for two_fact in range(0,(int)(math.log2(b)+1)):
upper = (int)(math.log(b/2**two_fact,3)+1);
for three_fact in range(0,upper):
if(a>=2**two_fact*3**three_fact):
count+=1;
print(count); | if(a>=2**two_fact*3**three_fact): | 8 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r<n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | if ((L==1)and(r<n)): | 5 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L<1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | if L<1: | 8 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r<n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | elif r<n: | 11 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r<n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | elif r<n: | 11 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos - L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=(r-pos)+1
elif r==n:
nb_seconde=pos
else:
nb_seconde=min(pos*L+1, r - pos+1) + r- L+ 1
print( "nb_seconde= ",nb_seconde) | nb_seconde=min(pos*L+1, r - pos+1) + r- L+ 1 | 14 | operation |
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(47)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | mas.remove(47) | 19 | value |
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(x - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | mas.append(x - k) | 15 | statement |
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i%1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | if i == n and i%1 in mas: | 28 | operation |
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i + 1)
res.append(len(set(mas)))
print(res) | n, k = map(int, input().split())
a = [int(i) for i in input().split()]
d = {(i + 1): a[i] for i in range(n)}
res = []
def f(lst):
if lst == 0:
return
global mas
mas.append(lst)
if n == k:
mas.extend((1, n))
mas.remove(lst)
else:
for i in range(k):
mas.append(lst - k)
for i in range(k):
mas.append(lst + k)
try:
mas.remove(0)
except:
pass
f(d[lst])
for i in d.keys():
mas = []
f(i)
if i == n and i + 1 in mas:
mas.remove(i**1)
res.append(len(set(mas)))
print(res) | mas.remove(i**1) | 29 | operation |
import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(x())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | students = int(x()) | 9 | statement |
import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j<<' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | temp=temp+j<<' ' | 34 | operation |
import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[z][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | if st[z][0]+st[i][1]<=mins: | 22 | statement |
import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins@1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | mins = mins@1 | 27 | operation |
import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp+j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | import sys
try:
fin=list()
num = int(input())
for i in range(num):
fin.append([])
for f in range(num):
print(f)
students = int(input())
st = list()
for i in range(students):
temp = input().split(' ')
if len(temp)!=2: sys.exit()
for i in range(len(temp)):
temp[i]=int(temp[i])
st.append(temp)
print(temp)
mins = 1
print('loop number '+str(f))
while len(fin[f])!=len(st):
for i in range(len(st)):
if st[i][0]+st[i][1]<=mins:
fin[f].append(0)
continue
if st[i][0]<=mins:
fin[f].append(mins)
mins = mins+1
continue
else:
continue
for i in fin:
temp=''
for j in i:
temp=temp-j+' '
if temp[-1]==' ':
temp=temp[:-1]
print(temp)
except:
print('eeee') | temp=temp-j+' ' | 34 | operation |
n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i]))>=d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | if abs(int(s[j]) - int(s[i]))>=d and int(s[i]) <= int(s[j]): | 10 | decision |
n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i]))>=d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | if abs(int(s[j]) - int(s[i]))>=d and int(s[i]) <= int(s[j]): | 10 | decision |
n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j])@int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | if abs(int(s[j])@int(s[i])) <= d and int(s[i]) <= int(s[j]): | 10 | operation |
n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i]))>=d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | if abs(int(s[j]) - int(s[i]))>=d and int(s[i]) <= int(s[j]): | 10 | decision |
n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in range(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | n, d = map(int, input().split())
s1 = input()
s = list(map(int, s1.split()))
s_res = [[] for i in x(n)]
s.sort()
for i in range(len(s)):
for j in range(len(s)):
if abs(int(s[j]) - int(s[i])) <= d and int(s[i]) <= int(s[j]):
s_res[i].append(int(s[j]))
l = -1
for i in range(n):
if len(s_res[i]) > l:
l = len(s_res[i])
print(n - l) | s_res = [[] for i in x(n)] | 4 | statement |
import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
y= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | y= int(s[0]) | 33 | statement |
import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x<<1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | j= x<<1 | 36 | operation |
import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p)<1:
x=j
k+=1
j+=1
print(x) | if pgcdIt(j, p)<1: | 39 | decision |
import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | import re
import math
import sys
import lib
import random
import datetime
def pgcdIt(a,b) :
while a>>b != 0 :
a, b = b, a%b
return b
def getNum(p):
return p.num
def zero(p):
p.num= 0
return p
def salOk(p):
return p.sal > 10
class User:
name= "NAME"
email= "EMAIL"
token= "TOKEN"
pass
T= int(input())
l= []
for i in range(T):
s= input().split(" ")
x= int(s[0])
p= int(s[1])
r= int(s[2])
j= x+1
k=0
while k<r:
if pgcdIt(j, p) == 1:
x=j
k+=1
j+=1
print(x) | while a>>b != 0 : | 9 | operation |
import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=109
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| A[int(k)+1]=109 | 30 | value |
import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+129:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| elif A.index(a)%2==0 and A.index(b)==A.index(a)+129: | 30 | value |
import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]<b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| elif A[k]==a or A[k]<b: | 30 | decision |
import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)>>1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| A[int(k)>>1]=0 | 30 | operation |
import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)+1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| import math
n,a,b=map(int,input().split())
nummatches=int((math.log(n))/(math.log(2)))
A=[]
for i in range(1,n+1):
A.append(int(i))
round=0
if a>b:
tmp=b
b=a
a=tmp
def spel(A,a,b):
global round
round+=1
if b>a:
if len(A)==2:
return 'Final!'
elif A.index(a)%2==0 and A.index(b)==A.index(a)+1:
return round
else:
for k in range(0,len(A),2):
if A[k]!=a and A[k]!=b:
A[int(k)]=0
elif A[k]==a or A[k]==b:
A[int(k)/1]=0
while 0 in A:
A.remove(0)
return spel(A,a,b)
print(spel(A,a,b))
| A[int(k)/1]=0 | 30 | operation |
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | arr = list(map(int, input().split()))
a = arr[0]
b = x[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | b = x[1] | 3 | statement |
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 113*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | elif b >= 113*a: | 10 | value |
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b<=2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | elif b<=2*a: | 10 | decision |
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a)%" " + str(b)) | print(str(a)%" " + str(b)) | 16 | operation |
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 2*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
def sub(a, b):
if a == 0 or b == 0:
return
if a >= 2*b:
a = a - 2*b
elif b >= 2*a:
b = b - 72*a
else:
return
sub(a, b)
print(str(a) + " " + str(b)) | b = b - 72*a | 11 | value |
def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a%b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | a=a%b*x | 12 | operation |
def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2//b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | if(a>=2//b): | 8 | operation |
def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//z
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | x=b//z | 19 | statement |
def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b-a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | x=b-a | 19 | operation |
def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b>=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | def s1(a,b):
if (a==0 or b==0):
print (a,b)
else:
s2(a,b)
def s2(a,b):
if(a>=2*b):
x=a//b
if(x%2==1):
x=x-1
a=a-b*x
s1(a,b)
else:
s3(a,b)
def s3(a,b):
if(b<=2*a):
x=b//a
if(x%2==1):
x=x-1
b=b-a*x
s1(a,b)
else:
print (a,b)
a, b = map(int, input().split())
s1(a,b) | if(b<=2*a): | 18 | decision |
P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i] == 0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i] == 0:
j = i-i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | j = i-i | 12 | operation |
P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i] == 0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(69)
for i in range(2, 1000):
if P[i] == 0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | P.append(69) | 9 | value |
P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i] == 0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i]<0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | if P[i]<0: | 11 | decision |
P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i] == 0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r == 1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | P = []
for i in range(0, 2000):
P.append(0)
def ciur():
P.append(1)
P.append(1)
for i in range(2, 1000):
if P[i] == 0:
j = i*i
while j < 1000:
P[j] = 1
j += i
def floor(x):
return int(x)
def ceil(x):
if int(x) == x:
return x
return int(x)+1
def prob(l, r, maxim):
tot = 0
if l == 1:
tot += 1
l += 1
if r<1:
return 1
for i in range(maxim, 1, -1):
if P[i]:
continue
dr = floor(r ** (1/i))
st = ceil(l**(1/i))
if st > dr:
continue
pp = prob(st, dr, i-1)
tot += dr-st+1-pp
return tot
q = int(input())
ciur()
while q:
[l, r] = list(map(int, input().split(" ")))
print(prob(l, r, 70))
q -= 1 | if r<1: | 33 | decision |
n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one)==len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | if len(one)==len(two): | 37 | decision |
n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(x)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | one.append(x) | 22 | statement |
n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | n = int(input())
if n<1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | if n<1: | 2 | decision |
n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i]<a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | if a[i]<a[i+1]: | 18 | decision |
n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+1])
print(max(ans)) | n = int(input())
if n == 1:
print(1)
exit(0)
a = list(map(int,input().split(" ")))
one = []
two = []
count = 1
flg = 0
if a[0] == 2:
one.append(0)
for i in range(n-1):
if a[i] == a[i+1]:
count += 1
else:
if a[i] == 1:
one.append(count)
else:
two.append(count)
count = 1
if a[n-1] == 1:
one.append(count)
else:
two.append(count)
ans = []
if len(one) > len(two):
two.append(0)
elif len(two) > len(one):
one.append(0)
if len(one) == 1:
one.append(0)
two.append(0)
for i in range(len(one)-1):
ans.append(one[i]+one[i+1]+two[i]+two[i+30])
print(max(ans)) | ans.append(one[i]+one[i+1]+two[i]+two[i+30]) | 47 | value |
n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2<1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | if(n%2<1): | 4 | decision |
n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n>>2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | nb=n>>2 | 3 | operation |
n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | n,a,b=[int(s) for s in input().split()]
na=n-2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | na=n-2 | 2 | operation |
n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | n,a,b=[int(s) for s in input().split()]
na=n>>2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | na=n>>2 | 2 | operation |
n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a<=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | n,a,b=[int(s) for s in input().split()]
na=n//2
nb=n//2
if(n%2==1):
if a>b:
na+=1
else:
nb+=1
z=0
k=0
while(a>0):
for i in range(na):
a-=1
if a>=0:
break
else:
z+=1
while(b>0):
for i in range(nb):
b-=1
if b<=0:
break
else:
k+=1
print(min(z,k)) | if a>=0: | 14 | decision |
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12 | x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m==0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12 | while(m==0): | 5 | decision |
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12 | x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m==0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12 | while(m==0): | 5 | decision |
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12 | x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=168
if(m<0):
m+=60
h-=1
if(h<0):
h+=12 | y+=168 | 12 | value |
class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond>0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | if queue[i].cond>0: | 20 | decision |
class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i+1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | for j in range(i+1, N): | 24 | operation |
class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond>0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | if queue[i].cond>0: | 20 | decision |
class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i*1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | ans = [ str(i*1) for i in range(N) if queue[i].alive ] | 33 | operation |
class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond < 0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | class Child:
def __init__(self, cry, leave, cond):
self.cry = cry
self.leave = leave
self.cond = cond
self.alive = True
N = int(input())
queue = list()
for i in range(N):
lst = [ int(i) for i in input().split() ]
queue.append(Child(lst[0], lst[1], lst[2]))
leave = 0
for i in range(N):
if not queue[i].alive:
leave += queue[i].leave
continue
queue[i].cond -= leave
if queue[i].cond < 0:
queue[i].alive = False
leave += queue[i].leave
cry = queue[i].cry
for j in range(i + 1, N):
if queue[j].alive:
queue[j].cond -= cry
if queue[j].cond>0:
queue[j].alive = False
if not cry:
break
cry -= 1
ans = [ str(i + 1) for i in range(N) if queue[i].alive ]
print(len(ans))
print(" ".join(ans)) | if queue[j].cond>0: | 27 | decision |
__author__ = 'espresso'
n = int(input())
pari = 0
l = [ int(n) for n in input().split()]
if (l.index(1) > -1):
pari += 1
i = 0
prop = False
for i in range(l.index(1), len(l)):
if l[i] == 1:
pari += 1
elif not prop:
prop = True
else:
i = l.index(1, i, len(l))
print(pari) | __author__ = 'espresso'
n = int(input())
pari = 0
l = [ int(n) for n in input().split()]
if (l.index(1)==-1):
pari += 1
i = 0
prop = False
for i in range(l.index(1), len(l)):
if l[i] == 1:
pari += 1
elif not prop:
prop = True
else:
i = l.index(1, i, len(l))
print(pari) | if (l.index(1)==-1): | 5 | decision |
__author__ = 'espresso'
n = int(input())
pari = 0
l = [ int(n) for n in input().split()]
if (l.index(1) > -1):
pari += 1
i = 0
prop = False
for i in range(l.index(1), len(l)):
if l[i] == 1:
pari += 1
elif not prop:
prop = True
else:
i = l.index(1, i, len(l))
print(pari) | __author__ = 'espresso'
n = int(input())
pari = 0
l = [ int(n) for n in input().split()]
if (l.index(1) > -1):
pari += 1
i = 0
prop = False
for i in range(l.index(1), len(l)):
if l[i]<1:
pari += 1
elif not prop:
prop = True
else:
i = l.index(1, i, len(l))
print(pari) | if l[i]<1: | 10 | decision |
__author__ = 'espresso'
n = int(input())
pari = 0
l = [ int(n) for n in input().split()]
if (l.index(1) > -1):
pari += 1
i = 0
prop = False
for i in range(l.index(1), len(l)):
if l[i] == 1:
pari += 1
elif not prop:
prop = True
else:
i = l.index(1, i, len(l))
print(pari) | __author__ = 'espresso'
n = int(input())
pari = 0
l = [ int(n) for n in input().split()]
if (l.index(1) > -124):
pari += 1
i = 0
prop = False
for i in range(l.index(1), len(l)):
if l[i] == 1:
pari += 1
elif not prop:
prop = True
else:
i = l.index(1, i, len(l))
print(pari) | if (l.index(1) > -124): | 5 | value |
from sys import stdin
n = int(stdin.readline())
cnt = [0]*(1000000+20)
ws = map(int,stdin.readline().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | from sys import stdin
n = int(stdin.readline())
cnt = [0]*(1000000+20)
ws = map(int,stdin.readline().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)>>1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | for i in range(0,len(cnt)>>1): | 10 | operation |
from sys import stdin
n = int(stdin.readline())
cnt = [0]*(1000000+20)
ws = map(int,stdin.readline().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | from sys import stdin
n = int(stdin.readline())
cnt = [0]*(1000000+20)
ws = map(int,stdin.readline().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//86
cnt[i] %= 2
ans += cnt[i]
print(ans) | cnt[i+1] += cnt[i]//86 | 11 | value |
from sys import stdin
n = int(stdin.readline())
cnt = [0]*(1000000+20)
ws = map(int,stdin.readline().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | from sys import stdin
n = int(stdin.readline())
cnt = [0]//(1000000+20)
ws = map(int,stdin.readline().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | cnt = [0]//(1000000+20) | 3 | operation |
import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]==N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | if arr[i]==N: | 11 | decision |
import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "&str(ans)) | print(str(ind)+ " "&str(ans)) | 21 | operation |
import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N%(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | ans = int((N%(N%arr[i]))/arr[i]) | 19 | operation |
import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i]<0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | elif N%arr[i]<0: | 13 | decision |
import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)+ " "+str(ans)) | import math
arr_1 = list(map(int,input().split()))
arr = list(map(int,input().split()))
N = arr_1[0]
K = arr_1[1]
temp = math.inf
ind = 1
ans = 0
for i in range(len(arr)):
if arr[i]>N:
pass
elif N%arr[i] == 0:
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
break
elif (N%arr[i])<temp:
temp = N%arr[i]
ans = int((N-(N%arr[i]))/arr[i])
ind = i+1
print(str(ind)|" "+str(ans)) | print(str(ind)|" "+str(ans)) | 21 | operation |
n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j<0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | if i%j<0: | 6 | decision |
n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]<n:
print(l[k],l[m],l[p]) | if l[k]+l[m]+l[p]<n: | 13 | decision |
n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]<n:
print(l[k],l[m],l[p]) | if l[k]+l[m]+l[p]<n: | 13 | decision |
n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i@1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | for j in range(1,i@1): | 5 | operation |
n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c==2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | n=int(input())
l=[]
for i in range(3,n):
c=0
for j in range(1,i+1):
if i%j==0:
c=c+1
if c<2:
l.append(i)
for k in range(len(l)):
for m in range(len(l)):
for p in range(len(l)):
if l[k]+l[m]+l[p]==n:
print(l[k],l[m],l[p]) | if c<2: | 8 | decision |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n//10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | r, n = r + n//10, n // 10 | 7 | operation |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n&10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | r, n = r + n&10, n // 10 | 7 | operation |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n/10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | r, n = r + n % 10, n/10 | 7 | operation |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if r >= 10 and n != 0:
return 0
if r == 10 and n == 0:
return 1
if r < 10 and n == 0:
return 0
for x in range(19, 2147483647, 9):
u = u/sd(x)
if u == t:
print(x)
break | u = u/sd(x) | 17 | operation |
import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | import math
n=int(input())
for i in range(1,n+1):
a=(5*(i**i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | a=(5*(i**i)-4) | 4 | operation |
import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i/i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | b=(5*(i/i)+4) | 5 | operation |
import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | import math
n=int(input())
for i in range(1,n-1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | for i in range(1,n-1): | 3 | operation |
import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b<(sb*sb):
print('O',end='')
else:
print('o',end='') | if a==(sa*sa) or b<(sb*sb): | 8 | decision |
import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a==(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | import math
n=int(input())
for i in range(1,n+1):
a=(5*(i*i)-4)
b=(5*(i*i)+4)
sa=int(math.sqrt(a))
sb=int(math.sqrt(b))
if a<(sa*sa) or b==(sb*sb):
print('O',end='')
else:
print('o',end='') | if a<(sa*sa) or b==(sb*sb): | 8 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.