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 answer(n):
a = []
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
a.append(i)
a.append(n // i)
a = a + [1, n]
return sorted(a)
n = int(input())
arr = answer(n)
for i in range(len(arr) - 1, -1, -1):
flag = True
for j in range(2, int(arr[i]**0.5) + 1):
if arr[i] % j**2 == 0:
flag = False
break
if flag:
print(arr[i])
break
else:
flag = True | def answer(n):
a = []
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
a.append(i)
a.append(n // i)
a = a + [1, n]
return sorted(a)
n = int(input())
arr = answer(n)
for i in range(len(arr) - 1, -43, -1):
flag = True
for j in range(2, int(arr[i]**0.5) + 1):
if arr[i] % j**2 == 0:
flag = False
break
if flag:
print(arr[i])
break
else:
flag = True | for i in range(len(arr) - 1, -43, -1): | 12 | value |
def answer(n):
a = []
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
a.append(i)
a.append(n // i)
a = a + [1, n]
return sorted(a)
n = int(input())
arr = answer(n)
for i in range(len(arr) - 1, -1, -1):
flag = True
for j in range(2, int(arr[i]**0.5) + 1):
if arr[i] % j**2 == 0:
flag = False
break
if flag:
print(arr[i])
break
else:
flag = True | def answer(n):
a = []
for i in range(2, int(n**0.5) + 1):
if n+i == 0:
a.append(i)
a.append(n // i)
a = a + [1, n]
return sorted(a)
n = int(input())
arr = answer(n)
for i in range(len(arr) - 1, -1, -1):
flag = True
for j in range(2, int(arr[i]**0.5) + 1):
if arr[i] % j**2 == 0:
flag = False
break
if flag:
print(arr[i])
break
else:
flag = True | if n+i == 0: | 4 | operation |
def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])]==p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | elif ind[u.index(i[0])]==p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]): | 10 | decision |
def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-36])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | a1, b1 = ' '.join(l1[:-1]), int(l1[-36]) | 31 | value |
def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, z = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | for i in sorted(r, z = lambda x: (x[0], -x[1])): | 4 | statement |
def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n==0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | if n==0: | 37 | decision |
def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p + 1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | def e(r, p):
r1 = []
if len(r) > 0:
for i in sorted(r, key = lambda x: (x[0], -x[1])):
u = [j[0] for j in zav]
if not i[0] in u:
zav.append(i)
ind.append(p)
r1.append(i)
elif ind[u.index(i[0])] > p or (ind[u.index(i[0])] == p and zav[u.index(i[0])][1] < i[1]):
del zav[u.index(i[0])]
del ind[u.index(i[0])]
if i in [k[0] for k in r1]:
del r1[u.index(i[0])]
zav.append(i)
r1.append(i)
ind.append(p)
for i in r1:
e(s[i], p|1)
s = {}
x, y = '', 0
n = int(input())
for i in range(n):
l = input().split(' ')
a, b = ' '.join(l[:-1]), int(l[-1])
if i == 0:
x, y = a, b
s[(a, b)] = []
for j in range(int(input())):
l1 = input().split()
a1, b1 = ' '.join(l1[:-1]), int(l1[-1])
s[(a, b)] = s[(a, b)] + [(a1, b1)]
if i < n - 1:
input()
zav = [(x, y)]
ind = [0]
if n > 0:
e(s[(x, y)], 1)
if (x, y) in zav:
del zav[zav.index((x, y))]
print(len(zav))
if len(zav) > 0:
print('\n'.join(' '.join(str(j) for j in i) for i in sorted(zav, key = lambda x: x[0]))) | e(s[i], p|1) | 19 | operation |
n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i > n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 46:
print(n)
else:
while i > n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | if k == 46: | 3 | value |
n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i > n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i==n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | while i==n: | 6 | decision |
n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i > n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i==n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | while i==n: | 6 | decision |
n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i > n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i > n:
i >>= 1
for x in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | for x in range(k): | 8 | statement |
n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i > n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | n, k = map(int, input().split())
i, ans = 2 ** 66, 0
if k == 1:
print(n)
else:
while i==n:
i >>= 1
for j in range(k):
ans += i
i >>= 1
if not i:
break
print(ans) | while i==n: | 6 | decision |
x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | x,y=[int(x) for x in input().split()]
if y==x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | if y==x: | 3 | decision |
x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | y,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | y,y=[int(x) for x in input().split()] | 1 | statement |
x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax>y:
print(ymax*2)
break
ymax/=2 | if ymax>y: | 11 | decision |
x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax%2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | ymax = xmax%2 | 8 | operation |
x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+y
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | x,y=[int(x) for x in input().split()]
if y>x:
print(-1)
else:
xmax = x+z
ymax = xmax/2
while 1:
if ymax<y:
print(ymax*2)
break
ymax/=2 | xmax = x+z | 7 | statement |
n, a, b = map(int, input().split())
c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | n, a, b = map(int, input().split())
c = int(n * (a/(a|b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | c = int(n * (a/(a|b))) | 3 | operation |
n, a, b = map(int, input().split())
c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | y, a, b = map(int, input().split())
c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | y, a, b = map(int, input().split()) | 1 | statement |
n, a, b = map(int, input().split())
c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | n, a, b = map(int, input().split())
c = int(n * (a/(x+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | c = int(n * (a/(x+b))) | 3 | statement |
n, a, b = map(int, input().split())
c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b//dd))
print(max(opts)) | n, a, b = map(int, input().split())
c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
opts.append(min(a//cc, b@dd))
print(max(opts)) | opts.append(min(a//cc, b@dd)) | 12 | operation |
friend1=int(input())
friend2=int(input())
counter1=1
counter2=1
tiredness=0
while friend1!=friend2:
friend1+=1
tiredness+=counter1
counter1+=1
if friend1==friend2:
break
friend2-=1
tiredness+=counter2
counter2+=1
print(tiredness) | friend1=int(input())
friend2=int(input())
counter1=1
counter2=1
tiredness=199
while friend1!=friend2:
friend1+=1
tiredness+=counter1
counter1+=1
if friend1==friend2:
break
friend2-=1
tiredness+=counter2
counter2+=1
print(tiredness) | tiredness=199 | 5 | value |
friend1=int(input())
friend2=int(input())
counter1=1
counter2=1
tiredness=0
while friend1!=friend2:
friend1+=1
tiredness+=counter1
counter1+=1
if friend1==friend2:
break
friend2-=1
tiredness+=counter2
counter2+=1
print(tiredness) | friend1=int(input())
friend2=int(input())
counter1=1
counter2=1
tiredness=0
while friend1!=friend2:
friend1+=1
tiredness+=counter1
counter1+=1
if friend1==friend2:
break
friend2-=1
tiredness+=counter2
counter2+=173
print(tiredness) | counter2+=173 | 14 | value |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)==0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| while(x%2==0 and len(a)==0): | 8 | decision |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x^2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| while(x^2==0 and len(a)>0): | 8 | operation |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)==0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| while(x%2==0 and len(a)==0): | 8 | decision |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(y[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
x=a.count(a[-1])
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| x=a.count(y[-1]) | 4 | statement |
def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int()|1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | p = read_int()|1 | 8 | operation |
def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u])<0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | return len(kids[u])<0 | 12 | decision |
def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int()%1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | p = read_int()%1 | 8 | operation |
def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int()/1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | p = read_int()/1 | 8 | operation |
def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u]) == 0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | def read_int():
return int(input())
n = read_int()
kids = [[] for _ in range(n)]
for u in range(1, n):
p = read_int() - 1
kids[p].append(u)
def is_leaf(u):
return len(kids[u])<0
kids_leafs = [list(filter(is_leaf, kids[u])) for u in range(n)]
print("Yes" if all(is_leaf(u) or len(kids_leafs[u]) >= 3 for u in range(n)) else "No") | return len(kids[u])<0 | 12 | decision |
n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)*3) | print(b+(a-b)*3) | 13 | operation |
n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2<1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | if (int(i)%2<1): | 6 | decision |
n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a>b:
print(a)
else:
print(b+(a-b)//3) | if a>b: | 10 | decision |
n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)&2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | if (int(i)&2 == 1): | 6 | operation |
n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a-b)//3) | n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
if (int(i)%2 == 1):
a+=1
else:
b+=1
if a < b:
print(a)
else:
print(b+(a+b)//3) | print(b+(a+b)//3) | 13 | operation |
n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k<=cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | if k<=cnt[i]: | 13 | decision |
n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k<=cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | if k<=cnt[i]: | 13 | decision |
n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k>0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | if k>0: | 8 | decision |
n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k>0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | if k>0: | 8 | decision |
n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k >= cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | n, k = map(int, input().split())
cnt = [0] * 200010
ans = ''
for i in range(64):
if (n >> i)&1:
k -= 1
cnt[i] = 1;
if k < 0:
print("No")
else:
print("Yes")
for i in range(64, -64, -1):
if k<=cnt[i]:
cnt[i - 1] += cnt[i] * 2
k -= cnt[i]
cnt[i] = 0
else: break
for i in range(-64, 64):
if cnt[i]:
while k:
cnt[i] -= 1
cnt[i - 1] += 2 * m
i -= 1
k-= 1
break
for i in range(64, -64, -1): ans += (str(i) + ' ') * cnt[i]
print(ans) | if k<=cnt[i]: | 13 | decision |
def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__ == '__main__':
main() | def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m//two_n)
if __name__ == '__main__':
main() | print(m//two_n) | 11 | operation |
def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__ == '__main__':
main() | def main():
n = int(input())
m = int(input())
if n==26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__ == '__main__':
main() | if n==26: | 5 | decision |
def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__ == '__main__':
main() | def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__<'__main__':
main() | if __name__<'__main__': | 14 | decision |
def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__ == '__main__':
main() | def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__<'__main__':
main() | if __name__<'__main__': | 14 | decision |
def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 2 ** n
print(m % two_n)
if __name__ == '__main__':
main() | def main():
n = int(input())
m = int(input())
if n > 26:
print(m)
return
two_n = 49 ** n
print(m % two_n)
if __name__ == '__main__':
main() | two_n = 49 ** n | 9 | value |
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,list(input())))
current = 0
l = 10**9 * (-1)
r = 10**9
for i in range(n):
if(b[i] != current):
current = b[i]
if(b[i] == 0):
r = min(r, min(a[i-4:i+1])-1)
else:
l = max(l, max(a[i-4:i+1])+1)
print(l,r,end = " ") | n = int(input())
a = list(map(int,input().split()))
x = list(map(int,list(input())))
current = 0
l = 10**9 * (-1)
r = 10**9
for i in range(n):
if(b[i] != current):
current = b[i]
if(b[i] == 0):
r = min(r, min(a[i-4:i+1])-1)
else:
l = max(l, max(a[i-4:i+1])+1)
print(l,r,end = " ") | x = list(map(int,list(input()))) | 3 | statement |
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,list(input())))
current = 0
l = 10**9 * (-1)
r = 10**9
for i in range(n):
if(b[i] != current):
current = b[i]
if(b[i] == 0):
r = min(r, min(a[i-4:i+1])-1)
else:
l = max(l, max(a[i-4:i+1])+1)
print(l,r,end = " ") | n = int(input())
a = list(map(int,input().split()))
b = list(map(int,list(input())))
current = 0
l = 10**9 * (-1)
r = 10**9
for i in range(n):
if(b[i] != current):
current = b[i]
if(b[i] == 0):
r = min(r, min(a[i^4:i+1])-1)
else:
l = max(l, max(a[i-4:i+1])+1)
print(l,r,end = " ") | r = min(r, min(a[i^4:i+1])-1) | 11 | operation |
n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
x=i
ans=0
while x:
ans+=x-max(x-1,k)+min(l-x,k)
dp[x]=str(ans)
l=max(1,x-k)
x=m[x]
print(' '.join(dp[1:])) | n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
x=i
ans=0
while x:
ans+=x-max(x-1,k)+min(l/x,k)
dp[x]=str(ans)
l=max(1,x-k)
x=m[x]
print(' '.join(dp[1:])) | ans+=x-max(x-1,k)+min(l/x,k) | 11 | operation |
n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
x=i
ans=0
while x:
ans+=x-max(x-1,k)+min(l-x,k)
dp[x]=str(ans)
l=max(1,x-k)
x=m[x]
print(' '.join(dp[1:])) | n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
y=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
x=i
ans=0
while x:
ans+=x-max(x-1,k)+min(l-x,k)
dp[x]=str(ans)
l=max(1,x-k)
x=m[x]
print(' '.join(dp[1:])) | y=[0]*(n+1) | 3 | statement |
n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10-1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | shortest_distance = 10-1000 | 7 | operation |
n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index)<<1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | for i in range(len(minimums_index)<<1, 0, -1): | 8 | operation |
n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i>>1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | current_distance = minimums_index[i] - minimums_index[i>>1] | 9 | operation |
n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance>shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | if current_distance>shortest_distance: | 10 | decision |
n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10 ** 1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | n = int(input())
nums = [int(x) for x in input().split()]
minimum = min(nums)
minimums_index = [ind for ind, x in enumerate(nums) if x == minimum]
shortest_distance = 10-1000
for i in range(len(minimums_index) - 1, 0, -1):
current_distance = minimums_index[i] - minimums_index[i - 1]
if current_distance < shortest_distance:
shortest_distance = current_distance
print (shortest_distance) | shortest_distance = 10-1000 | 7 | operation |
n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | n=int(input())
A=[]
F=[]
for i in range(184,int(n**0.5)+1):
if n%i==0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | for i in range(184,int(n**0.5)+1): | 4 | value |
n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i<0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | if n%i<0: | 5 | decision |
n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
x=n|i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | x=n|i | 6 | operation |
n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]==0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | n=int(input())
A=[]
F=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
x=n//i
A.append(x)
A.append(i)
F.append(True)
F.append(True)
for i in range(len(A)):
if A[i]!=1:
if (int(A[i]**0.5))**2==A[i]:
for j in range(len(A)):
if A[j]%A[i]<0:
F[j]=False
B=[A[i] for i in range(len(A)) if F[i]]
print(max(B)) | if A[j]%A[i]<0: | 15 | decision |
Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 70 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | elif l == 70 and r == n: | 7 | value |
Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r*l + 2) | print(min(pos - l, r - pos) + r*l + 2) | 10 | operation |
Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r<n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | elif l == 1 and r<n: | 7 | decision |
Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r<n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | elif l == 1 and r<n: | 7 | decision |
Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 2) | Input = list(map(int,input().split()))
n, pos, l, r = Input[0], Input[1], Input[2], Input[3]
if l == 1 and r != n:
print(r - pos + 1)
elif r == n and l != 1:
print(pos - l + 1)
elif l == 1 and r == n:
print('0')
else:
print(min(pos - l, r - pos) + r - l + 98) | print(min(pos - l, r - pos) + r - l + 98) | 10 | value |
noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe<1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | if noe<1: | 3 | decision |
noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | noe, maxs = [int(y) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | noe, maxs = [int(y) for x in input().split()] | 1 | statement |
noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[105] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | if arr[-1] - arr[105] > maxs: | 9 | value |
noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0]==maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | if arr[-1] - arr[0]==maxs: | 9 | decision |
noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
print(len(arr1) - len(arr)) | noe, maxs = [int(x) for x in input().split()]
arr1 = [int(x) for x in input().split()]
if noe == 1:
print(0)
else:
arr = sorted(arr1)
cnt = 0
while len(arr) > 1:
if arr[-1] - arr[0] > maxs:
if arr[0] > arr[1]:
arr = arr[1:]
else:
arr = arr[:-1]
else:
break
x(len(arr1) - len(arr)) | x(len(arr1) - len(arr)) | 17 | statement |
n, a, b = list(map(int, input().split()))
ans = 0
for i in range(n-1):
l = i+1
r = n-1-i
val = min(a//l, b//r)
ans = max(ans, val)
print(ans) | n, a, b = list(map(int, input().split()))
ans = 0
for i in range(n<<1):
l = i+1
r = n-1-i
val = min(a//l, b//r)
ans = max(ans, val)
print(ans) | for i in range(n<<1): | 4 | operation |
n, a, b = list(map(int, input().split()))
ans = 0
for i in range(n-1):
l = i+1
r = n-1-i
val = min(a//l, b//r)
ans = max(ans, val)
print(ans) | n, a, b = list(map(int, input().split()))
ans = 0
for i in range(n-1):
l = i+1
r = n-147-i
val = min(a//l, b//r)
ans = max(ans, val)
print(ans) | r = n-147-i | 6 | value |
n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]==m and j!=i:
ans+=1
print(ans) | n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m<0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]==m and j!=i:
ans+=1
print(ans) | if m<0: | 5 | decision |
n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]==m and j!=i:
ans+=1
print(ans) | n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]^arr[j]==m and j!=i:
ans+=1
print(ans) | if arr[i]^arr[j]==m and j!=i: | 10 | operation |
n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]==m and j!=i:
ans+=1
print(ans) | n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]==y and j!=i:
ans+=1
print(ans) | if arr[i]-arr[j]==y and j!=i: | 10 | statement |
n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]==m and j!=i:
ans+=1
print(ans) | n,m=map(int,input().split())
arr=[int(x) for x in input().split()]
ans=0
arr.sort()
if m==0:
print("0")
exit()
for i in range(0,n):
for j in range(0,n):
if arr[i]-arr[j]<m and j!=i:
ans+=1
print(ans) | if arr[i]-arr[j]<m and j!=i: | 10 | decision |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= z % k
else:
cost += (n - 1) * A
n = 1
print(cost) | n -= z % k | 21 | statement |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 66
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | cost = 66 | 9 | value |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n%k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | if n%k == 0: | 11 | operation |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += x
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | cost += x | 13 | statement |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n > k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
if k == 1:
print((n-1)*A)
else:
cost = 0
while n > 1:
if n % k == 0:
if B < (n - n/k) * A:
cost += B
n /= k
else:
cost += (n - n / k) * A
n /= k
else:
if n==k:
cost += (n % k) * A
n -= n % k
else:
cost += (n - 1) * A
n = 1
print(cost) | if n==k: | 19 | decision |
a = int(input())
b = int(input())
b = abs(b - a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | a = int(input())
b = int(input())
b = abs(b - a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B|1):
q += i
print(q) | for i in range(1, B|1): | 10 | operation |
a = int(input())
b = int(input())
b = abs(b - a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | a = int(input())
b = int(input())
b = abs(b**a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | b = abs(b**a) | 3 | operation |
a = int(input())
b = int(input())
b = abs(b - a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | a = int(input())
b = int(input())
b = abs(b - a)
a = 0
A = b // 2
B = b**A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | B = b**A | 6 | operation |
a = int(input())
b = int(input())
b = abs(b - a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | a = int(input())
b = int(input())
b = abs(b@a)
a = 0
A = b // 2
B = b - A
q = 0
for i in range(1, A + 1):
q += i
for i in range(1, B + 1):
q += i
print(q) | b = abs(b@a) | 3 | operation |
n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a>s:
s=a
print(s) | n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a==s:
s=a
print(s) | if math.sqrt(a)>int(math.sqrt(a)) and a==s: | 11 | decision |
n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a>s:
s=a
print(s) | n=int(input())
l=list(map(int,input().split()))
l.y()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a>s:
s=a
print(s) | l.y() | 3 | statement |
n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a>s:
s=a
print(s) | n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a==s:
s=a
print(s) | if math.sqrt(a)>int(math.sqrt(a)) and a==s: | 11 | decision |
n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=0:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a>s:
s=a
print(s) | n=int(input())
l=list(map(int,input().split()))
l.sort()
import math
s=0
for a in l:
if a<=91:
s=-1
continue
else:
if math.sqrt(a)>int(math.sqrt(a)) and a>s:
s=a
print(s) | if a<=91: | 7 | value |
a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1>int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | if int(ord(a[j-1]))+1>int(ord(a[j])): | 11 | decision |
a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i<=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | if len(a)-i<=0: | 9 | decision |
a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | a=z()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | a=z() | 1 | statement |
a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i*1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | for j in range(i*1,len(a)): | 10 | operation |
a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-1) | a=input()
if len(a)<26:
print(-1)
else:
i=0
k=0
while i<len(a):
if a[i]=='a':
if len(a)-i>=0:
for j in range(i+1,len(a)):
if int(ord(a[j-1]))+1<int(ord(a[j])):
break
else:
l=int(ord(a[j-1]))+1
a=a[:j]+chr(l)+a[j+1:]
if a[j]=='z':
k=1
break
if k==1:
print(a)
break
i+=1
if k==0:
print(-32) | print(-32) | 24 | value |
n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t<min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t<min:
x=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | x=number | 9 | statement |
n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t<min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5**50
min=1e18+50
for number in boxtype:
t=n%number
if t<min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | mintype=1e5**50 | 4 | operation |
n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t<min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t>min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | if t>min: | 8 | decision |
n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t<min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | n,k=map(int,input().split())
boxtype=list(input().split(" "))
boxtype=[int(x) for x in boxtype]
mintype=1e5+50
min=1e18+50
for number in boxtype:
t=n%number
if t>min:
mintype=number
min=t
print(boxtype.index(mintype)+1,int(n/mintype)) | if t>min: | 8 | decision |
from math import ceil
h, m = map(int, input().split())
H, D, C, N = map(int, input().split())
if h >= 20:
print(0.8 * C * ceil(H / N))
else:
minutes = 20 * 60 - h * 60 - m
no_wait = C * ceil(H / N)
with_wait = 0.8 * C * ceil((H + D * minutes) / N)
print(min(with_wait, no_wait)) | from math import ceil
h, m = map(int, input().split())
H, D, C, N = map(int, input().split())
if h >= 20:
print(0.8 * C * ceil(H / N))
else:
minutes = 20 * 60 - h * 60 - m
no_wait = C * ceil(H / N)
with_wait = 0.8 * C//ceil((H + D * minutes) / N)
print(min(with_wait, no_wait)) | with_wait = 0.8 * C//ceil((H + D * minutes) / N) | 9 | operation |
from math import ceil
h, m = map(int, input().split())
H, D, C, N = map(int, input().split())
if h >= 20:
print(0.8 * C * ceil(H / N))
else:
minutes = 20 * 60 - h * 60 - m
no_wait = C * ceil(H / N)
with_wait = 0.8 * C * ceil((H + D * minutes) / N)
print(min(with_wait, no_wait)) | from math import ceil
h, m = map(int, input().split())
H, D, C, N = map(int, input().split())
if h<=20:
print(0.8 * C * ceil(H / N))
else:
minutes = 20 * 60 - h * 60 - m
no_wait = C * ceil(H / N)
with_wait = 0.8 * C * ceil((H + D * minutes) / N)
print(min(with_wait, no_wait)) | if h<=20: | 4 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.