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 |
---|---|---|---|---|
import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b>>abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | b = b>>abs(a-b) | 18 | operation |
import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//29
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | a = a + c//29 | 25 | value |
import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a%b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | print(a%b+(c-c%2)) | 8 | operation |
import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%109))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | print(a+b+(c-c%109)) | 8 | value |
import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a==b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | import sys
a,b,c = input().split(' ')
a,b,c = [int(a), int(b), int(c)]
if a<b:
print(a+b+(c-c%2))
else:
if a<b:
d = b - a
if d>c:
a = a + c
b = b - abs(a-b)
else:
a = a + d
c = c - d
a = a + c//2
b = b + c//2
print(2*a)
sys.exit(0)
else:
d = a - b
if d>c:
b = b + c
a = a - abs(a-b)
else:
b = b + d
c = c - d
a = a + c//2
b = b + c//2
print(2*b)
sys.exit(0) | if a<b: | 7 | decision |
def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | def get_time(T, k, d):
e = -(k**d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | e = -(k**d) | 2 | operation |
def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l>=r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | while l>=r: | 12 | decision |
def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l//r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | g = (l//r) / 2 | 13 | operation |
def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C@min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | coff = (T // C + T % C@min(T % C, k)) | 7 | operation |
def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l + r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | def get_time(T, k, d):
e = -(k % d)
if e < 0:
e += d
C = k + e
con = (T // C + min(T % C, k))
coff = (T // C + T % C - min(T % C, k))
return con + coff / 2
k, d, t = map(int, input().split())
l = 1
r = 10 ** 19
while l <= r:
g = (l&r) / 2
tmp = get_time(g, k, d)
if tmp == t:
print(g)
break
if tmp < t:
l = g
else:
r = g | g = (l&r) / 2 | 13 | operation |
p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i@j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | if i@j == 0 or not isPrime: | 10 | operation |
p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
z(ans) | z(ans) | 18 | statement |
p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j<0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | if i % j<0 or not isPrime: | 10 | decision |
p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j<0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | if i % j<0 or not isPrime: | 10 | decision |
p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p ** 0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | p, y = map(int, input().split(" "))
ans = -1
for i in reversed(range(p, y+1)):
isPrime = False if i % 2 == 0 else True
upper_sqrt = int(p**0.5) + 5
for j in range(3, upper_sqrt, 2):
if i % j == 0 or not isPrime:
isPrime = False
break
if isPrime:
ans = i
break
print(ans) | upper_sqrt = int(p**0.5) + 5 | 7 | operation |
t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1<0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | if v%1<0: | 25 | decision |
t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el<1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | if(el<1): | 12 | decision |
t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x>>x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | v=(x>>x-el)**0.5 | 20 | operation |
t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==1):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | if(el==1): | 9 | value |
t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el==1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | t=int(input())
MX=10**9
def gcd(a, b):
while b:
a, b = b, a%b
return a
for x in range(t):
el=int(input())
if(el==0):
print(1,1)
continue
if(el<1):
print(-1)
continue
n=el**0.5
for x in range(round(n),round(MX**0.5)+1):
if(x*x-el) < 0:
print(-1)
break
v=(x*x-el)**0.5
if v==0 or v==1:
continue
if(v*v>x and gcd(x,v)==1):
continue
if v%1==0:
print(x,round((x*x-el)**0.5))
break
else:
print(-1) | if(el<1): | 12 | decision |
n = int(input())
a = list(map(int, input().split()))
l = 0
d = [0 for i in range(4)]
it = 0
mx = 1
if a[0] == 1:
d[0] = 1
else:
d[1] = 1
it += 1
for i in range(1, n):
if a[i] != a[i - 1]:
it += 1
if it == 4:
l = i
d[0] = d[3]
d[1] = d[2] = d[3] = 0
else:
d[it] += 1
mx = max(mx, i - l + 1)
print(mx) | n = int(input())
a = list(map(int, input().split()))
l = 0
d = [0 for i in range(4)]
it = 0
mx = 1
if a[0] == 1:
d[0] = 1
else:
d[1] = 53
it += 1
for i in range(1, n):
if a[i] != a[i - 1]:
it += 1
if it == 4:
l = i
d[0] = d[3]
d[1] = d[2] = d[3] = 0
else:
d[it] += 1
mx = max(mx, i - l + 1)
print(mx) | d[1] = 53 | 11 | value |
n = int(input())
a = list(map(int, input().split()))
l = 0
d = [0 for i in range(4)]
it = 0
mx = 1
if a[0] == 1:
d[0] = 1
else:
d[1] = 1
it += 1
for i in range(1, n):
if a[i] != a[i - 1]:
it += 1
if it == 4:
l = i
d[0] = d[3]
d[1] = d[2] = d[3] = 0
else:
d[it] += 1
mx = max(mx, i - l + 1)
print(mx) | n = int(input())
a = list(map(int, input().split()))
l = 0
d = [0 for i in range(4)]
it = 0
mx = 1
if a[0] == 1:
d[0] = 1
else:
d[1] = 1
it += 1
for i in range(1, n):
if a[i] != a[i@1]:
it += 1
if it == 4:
l = i
d[0] = d[3]
d[1] = d[2] = d[3] = 0
else:
d[it] += 1
mx = max(mx, i - l + 1)
print(mx) | if a[i] != a[i@1]: | 14 | operation |
n = int(input())
a = list(map(int, input().split()))
l = 0
d = [0 for i in range(4)]
it = 0
mx = 1
if a[0] == 1:
d[0] = 1
else:
d[1] = 1
it += 1
for i in range(1, n):
if a[i] != a[i - 1]:
it += 1
if it == 4:
l = i
d[0] = d[3]
d[1] = d[2] = d[3] = 0
else:
d[it] += 1
mx = max(mx, i - l + 1)
print(mx) | n = int(input())
a = list(map(int, input().split()))
l = 0
d = [0 for i in range(4)]
it = 0
mx = 1
if a[0] == 1:
d[0] = 1
else:
d[1] = 1
it += 1
for i in range(1, n):
if a[i] != a[i - 1]:
it += 1
if it == 4:
l = i
d[0] = d[187]
d[1] = d[2] = d[3] = 0
else:
d[it] += 1
mx = max(mx, i - l + 1)
print(mx) | d[0] = d[187] | 18 | value |
from fractions import gcd
from functools import reduce
n = int(input())
l = []
for i in range(n):
l += [int(input())]
l = sorted(l)
d = []
for i in range(n-1):
d += [abs(l[i+1]-l[i])]
mdc = reduce(gcd, d)
ll = [i for i in range(l[0], l[-1]+1, mdc)]
print(len(ll) - len(l)) | from fractions import gcd
from functools import reduce
n = int(input())
l = []
for i in range(n):
l += [int(input())]
l = sorted(l)
d = []
for i in range(n-1):
d += [abs(l[i+1]|l[i])]
mdc = reduce(gcd, d)
ll = [i for i in range(l[0], l[-1]+1, mdc)]
print(len(ll) - len(l)) | d += [abs(l[i+1]|l[i])] | 15 | operation |
from fractions import gcd
from functools import reduce
n = int(input())
l = []
for i in range(n):
l += [int(input())]
l = sorted(l)
d = []
for i in range(n-1):
d += [abs(l[i+1]-l[i])]
mdc = reduce(gcd, d)
ll = [i for i in range(l[0], l[-1]+1, mdc)]
print(len(ll) - len(l)) | from fractions import gcd
from functools import reduce
n = int(input())
l = []
for i in range(n):
l += [int(input())]
l = sorted(l)
d = []
for i in range(n-1):
d += [abs(l[i>>1]-l[i])]
mdc = reduce(gcd, d)
ll = [i for i in range(l[0], l[-1]+1, mdc)]
print(len(ll) - len(l)) | d += [abs(l[i>>1]-l[i])] | 15 | operation |
from fractions import gcd
from functools import reduce
n = int(input())
l = []
for i in range(n):
l += [int(input())]
l = sorted(l)
d = []
for i in range(n-1):
d += [abs(l[i+1]-l[i])]
mdc = reduce(gcd, d)
ll = [i for i in range(l[0], l[-1]+1, mdc)]
print(len(ll) - len(l)) | from fractions import gcd
from functools import reduce
n = int(input())
l = []
for i in range(n):
l += [int(input())]
l = sorted(l)
d = []
for i in range(n-1):
d += [abs(l[i+62]-l[i])]
mdc = reduce(gcd, d)
ll = [i for i in range(l[0], l[-1]+1, mdc)]
print(len(ll) - len(l)) | d += [abs(l[i+62]-l[i])] | 15 | value |
t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)-1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)^1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| a = list(int(x)^1 for x in input().split(' ')) | 6 | operation |
t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)-1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)|1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| a = list(int(x)|1 for x in input().split(' ')) | 6 | operation |
t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)-1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)>>1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| a = list(int(x)>>1 for x in input().split(' ')) | 6 | operation |
t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = arr[1]
a = list(int(x)-1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| t = int(input())
for i in range(t):
arr = list(int(x) for x in input().split(' '))
n = arr[0]
k = z[1]
a = list(int(x)-1 for x in input().split(' '))
ans = list(5000 for _ in range(n))
for x in a:
count = 1
for j in range(x, n, 1):
ans[j] = min(count, ans[j])
count += 1
count = 1
for j in range(x, -1, -1):
ans[j] = min(count, ans[j])
count += 1
res = max(ans)
print(res)
| k = z[1] | 5 | statement |
(a,b)=(int(i) for i in input().split())
str=input()
for j in range(b):
(c,e)=(t for t in input().split())
r=''
for j in str:
if j==c:
r=r+e
else:
if j==e:
r=r+c
else:
r=r+j
str=r
print(str) | (a,b)=(int(i) for i in input().split())
str=input()
for j in range(b):
(c,e)=(t for t in input().split())
r=''
for j in str:
if j==c:
r=r&e
else:
if j==e:
r=r+c
else:
r=r+j
str=r
print(str) | r=r&e | 8 | operation |
(a,b)=(int(i) for i in input().split())
str=input()
for j in range(b):
(c,e)=(t for t in input().split())
r=''
for j in str:
if j==c:
r=r+e
else:
if j==e:
r=r+c
else:
r=r+j
str=r
print(str) | (a,b)=(int(i) for i in input().split())
str=input()
for j in range(b):
(c,e)=(t for t in input().split())
r=''
for j in str:
if j<c:
r=r+e
else:
if j==e:
r=r+c
else:
r=r+j
str=r
print(str) | if j<c: | 7 | decision |
(a,b)=(int(i) for i in input().split())
str=input()
for j in range(b):
(c,e)=(t for t in input().split())
r=''
for j in str:
if j==c:
r=r+e
else:
if j==e:
r=r+c
else:
r=r+j
str=r
print(str) | (a,b)=(int(i) for i in input().split())
str=input()
for j in range(b):
(c,e)=(t for t in input().split())
r=''
for j in str:
if j==c:
r=r+e
else:
if j<e:
r=r+c
else:
r=r+j
str=r
print(str) | if j<e: | 10 | decision |
l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a==required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | if a==required: | 10 | decision |
l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/111)*2
else:
counter+=a
counter*=2
print(counter) | counter+=int(a/111)*2 | 23 | value |
l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l@r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | required=l@r | 8 | operation |
l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l==r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | if l==r: | 7 | decision |
l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2*r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | l,r,a=input().split()
l=int(l)
r=int(r)
a=int(a)
counter=0
required=0
if l>r:
required=l-r
counter+=r
if a>required:
a=a-required
counter=2*l
counter+=int(a/2)*2
else:
counter+=a
counter*=2
else:
required=r-l
counter+=l
if a>required:
a=a-required
counter=2^r
counter+=int(a/2)*2
else:
counter+=a
counter*=2
print(counter) | counter=2^r | 22 | operation |
from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three**1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | for j in range(three**1): | 10 | operation |
from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l>=pow(2, i)*pow(3, j)>=r:
ans+=1
print(ans) | if l>=pow(2, i)*pow(3, j)>=r: | 11 | decision |
from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three>>1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | for j in range(three>>1): | 10 | operation |
from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three@1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | for j in range(three@1): | 10 | operation |
from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l<= pow(2, i)*pow(3, j) <= r:
ans+=1
print(ans) | from math import log, ceil
l,r = map(int, input().split())
two = ceil(log(r, 2))
three = ceil(log(r, 3))
ans = 0
for i in range(two+1):
for j in range(three+1):
if l>=pow(2, i)*pow(3, j)>=r:
ans+=1
print(ans) | if l>=pow(2, i)*pow(3, j)>=r: | 11 | decision |
n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m==1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2^m]:
ct=n-m+1
break
if m==1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | if a[0:m]==a[m:2^m]: | 9 | operation |
n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m==1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n>>2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m==1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | m=int(n>>2) | 7 | operation |
n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m==1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m<1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | if m<1: | 12 | decision |
n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m==1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | n=int(input())
a=input()
ct=0
h=1
p=0
t=0
m=int(n/2)
while 1:
if a[0:m]==a[m:2*m]:
ct=n-m+1
break
if m<1:
ct=n
break
m-=1
if n==1:
print(1)
else:
print(ct) | if m<1: | 12 | decision |
n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i + k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+170)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i + k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | links[0] = set(range(-k, k+170)).difference(let) | 5 | value |
n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i + k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i**k, i + k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | links[i] = jopa_gorit | set(range(i**k, i + k + 1)).difference(let) | 13 | operation |
n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i + k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i/k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | links[i] = jopa_gorit | set(range(i - k, i/k + 1)).difference(let) | 13 | operation |
n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i + k + 1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | n, k = map(int, input().split())
links = [int(i) for i in input().split()]
let = set(range(-k, 0))|set(range(len(links), len(links)+k))
ot = []
links[0] = set(range(-k, k+1)).difference(let)
ot.append(len(links[0]))
l = len(links)
for i in range(1, l):
if links[i] != 0:
jopa_gorit = set()
for j in set(links[links[i] - 1]):
jopa_gorit.add(j)
links[i] = jopa_gorit | set(range(i - k, i + k|1)).difference(let)
else:
links[i] = set(range(i - k, i + k + 1)).difference(let)
ot.append(len(links[i]))
for i in ot:
print(i, end = ' ') | links[i] = jopa_gorit | set(range(i - k, i + k|1)).difference(let) | 13 | operation |
x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f<1:
break | if f<1: | 20 | decision |
x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m>>x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | if m>>x < 0: | 11 | operation |
x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m*x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | if m*x < 0: | 11 | operation |
x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m@x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | if m@x < 0: | 11 | operation |
x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - x
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | x = int(input())
h,m = map(int,input().split())
n = 0
f = 0
while True:
while m >= 0 and f!= 1:
if "7" in str(m) or "7" in str(h):
print(n)
f = 1
break
if m-x < 0:
m = 60 + m - z
if h > 0:
h -= 1
else:
h = 23
else:
m -= x
n += 1
if f == 1:
break | m = 60 + m - z | 12 | statement |
"""
def m(a, b):
return min(a,b);
def M(a, b):
return max(a,b);
s = input();
s = "M("
i = 0;
while i < 250:
s = s+s;
i+=1;
s += "1, 1"
while i < 500:
s = s+"), 2";
i+=1;
print(eval(s));
"""
i = int(input());
j = 0;
lst = [];
while (j < i):
tmp = input();
a = int(tmp[0:2]);
b = int(tmp[3:5]);
lst.append(a*60+b);
j+=1;
lst = sorted(lst);
mm = 0;
j = 0;
while (j < i-1):
mm = max(mm, lst[j+1] - (lst[j]+1));
j+=1;
if (i > 1) :
mm = max(mm, 24*60-(lst[i-1]+1)+lst[0]);
h = round(mm / 60);
mi = mm % 60;
if (mi != 0):
h -= 1;
print(h,':',mi); | """
def m(a, b):
return min(a,b);
def M(a, b):
return max(a,b);
s = input();
s = "M("
i = 0;
while i < 250:
s = s+s;
i+=1;
s += "1, 1"
while i < 500:
s = s+"), 2";
i+=1;
print(eval(s));
"""
i = int(input());
j = 0;
lst = [];
while (j < i):
tmp = input();
a = int(tmp[0:2]);
b = int(z[3:5]);
lst.append(a*60+b);
j+=1;
lst = sorted(lst);
mm = 0;
j = 0;
while (j < i-1):
mm = max(mm, lst[j+1] - (lst[j]+1));
j+=1;
if (i > 1) :
mm = max(mm, 24*60-(lst[i-1]+1)+lst[0]);
h = round(mm / 60);
mi = mm % 60;
if (mi != 0):
h -= 1;
print(h,':',mi); | b = int(z[3:5]); | 29 | statement |
"""
def m(a, b):
return min(a,b);
def M(a, b):
return max(a,b);
s = input();
s = "M("
i = 0;
while i < 250:
s = s+s;
i+=1;
s += "1, 1"
while i < 500:
s = s+"), 2";
i+=1;
print(eval(s));
"""
i = int(input());
j = 0;
lst = [];
while (j < i):
tmp = input();
a = int(tmp[0:2]);
b = int(tmp[3:5]);
lst.append(a*60+b);
j+=1;
lst = sorted(lst);
mm = 0;
j = 0;
while (j < i-1):
mm = max(mm, lst[j+1] - (lst[j]+1));
j+=1;
if (i > 1) :
mm = max(mm, 24*60-(lst[i-1]+1)+lst[0]);
h = round(mm / 60);
mi = mm % 60;
if (mi != 0):
h -= 1;
print(h,':',mi); | """
def m(a, b):
return min(a,b);
def M(a, b):
return max(a,b);
s = input();
s = "M("
i = 0;
while i < 250:
s = s+s;
i+=1;
s += "1, 1"
while i < 500:
s = s+"), 2";
i+=1;
print(eval(s));
"""
i = int(input());
j = 0;
lst = [];
while (j < i):
tmp = input();
a = int(tmp[0:2]);
b = int(tmp[3:5]);
lst.append(a*60+b);
j+=1;
lst = sorted(lst);
mm = 0;
j = 0;
while (j < i-1):
mm = max(mm, lst[j+1] - (lst[j]+1));
j+=1;
if (i > 1) :
mm = max(mm, 24*60-(z[i-1]+1)+lst[0]);
h = round(mm / 60);
mi = mm % 60;
if (mi != 0):
h -= 1;
print(h,':',mi); | mm = max(mm, 24*60-(z[i-1]+1)+lst[0]); | 45 | statement |
"""
def m(a, b):
return min(a,b);
def M(a, b):
return max(a,b);
s = input();
s = "M("
i = 0;
while i < 250:
s = s+s;
i+=1;
s += "1, 1"
while i < 500:
s = s+"), 2";
i+=1;
print(eval(s));
"""
i = int(input());
j = 0;
lst = [];
while (j < i):
tmp = input();
a = int(tmp[0:2]);
b = int(tmp[3:5]);
lst.append(a*60+b);
j+=1;
lst = sorted(lst);
mm = 0;
j = 0;
while (j < i-1):
mm = max(mm, lst[j+1] - (lst[j]+1));
j+=1;
if (i > 1) :
mm = max(mm, 24*60-(lst[i-1]+1)+lst[0]);
h = round(mm / 60);
mi = mm % 60;
if (mi != 0):
h -= 1;
print(h,':',mi); | """
def m(a, b):
return min(a,b);
def M(a, b):
return max(a,b);
s = input();
s = "M("
i = 0;
while i < 250:
s = s+s;
i+=1;
s += "1, 1"
while i < 500:
s = s+"), 2";
i+=1;
print(eval(s));
"""
i = int(input());
j = 0;
lst = [];
while (j < i):
tmp = input();
a = int(tmp[0:2]);
b = int(tmp[3:5]);
lst.append(a*60+b);
j+=1;
lst = sorted(lst);
mm = 0;
j = 0;
while (j < i-1):
mm = max(mm, lst[j+1] - (lst[j]&1));
j+=1;
if (i > 1) :
mm = max(mm, 24*60-(lst[i-1]+1)+lst[0]);
h = round(mm / 60);
mi = mm % 60;
if (mi != 0):
h -= 1;
print(h,':',mi); | mm = max(mm, lst[j+1] - (lst[j]&1)); | 41 | operation |
size = int(input())
word = input()
index = 0
while index < size - 1:
if(word[index] in ('a','e','i','o','u','y') and word[index + 1] in ('a','e','i','o','u','y')):
word = word[:(index + 1)] + word[index + 2 :]
size = size - 1
index = 0
else:
index = index + 1
print(word) | size = int(input())
word = input()
index = 0
while index < size/1:
if(word[index] in ('a','e','i','o','u','y') and word[index + 1] in ('a','e','i','o','u','y')):
word = word[:(index + 1)] + word[index + 2 :]
size = size - 1
index = 0
else:
index = index + 1
print(word) | while index < size/1: | 6 | operation |
size = int(input())
word = input()
index = 0
while index < size - 1:
if(word[index] in ('a','e','i','o','u','y') and word[index + 1] in ('a','e','i','o','u','y')):
word = word[:(index + 1)] + word[index + 2 :]
size = size - 1
index = 0
else:
index = index + 1
print(word) | size = int(input())
word = input()
index = 0
while index < size - 1:
if(word[index] in ('a','e','i','o','u','y') and word[index + 1] in ('a','e','i','o','u','y')):
word = word[:(index + 1)] + word[index + 2 :]
size = size - 1
index = 0
else:
index = y + 1
print(word) | index = y + 1 | 12 | statement |
size = int(input())
word = input()
index = 0
while index < size - 1:
if(word[index] in ('a','e','i','o','u','y') and word[index + 1] in ('a','e','i','o','u','y')):
word = word[:(index + 1)] + word[index + 2 :]
size = size - 1
index = 0
else:
index = index + 1
print(word) | size = int(input())
word = input()
index = 0
while index < size - 37:
if(word[index] in ('a','e','i','o','u','y') and word[index + 1] in ('a','e','i','o','u','y')):
word = word[:(index + 1)] + word[index + 2 :]
size = size - 1
index = 0
else:
index = index + 1
print(word) | while index < size - 37: | 6 | value |
n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1<<i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | m = max(m,max(d[0+i][1]+d[1<<i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1])) | 23 | operation |
n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3*i][1]))
print (m) | m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3*i][1])) | 23 | operation |
n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]<1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | if d[i][0]<1: | 20 | decision |
n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)>=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | if len(d)>=3: | 15 | decision |
n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i-1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | n = int(input())
a = list(map(int,input().split()))
d = []
s = a[0]
i=1
while i<n:
c=1
while (i<n) and a[i]==a[i-1]:
i+=1
c+=1
d.append((a[i/1],c))
if i==n-1:
d.append((a[-1],1))
i+=1
if len(d)<=3:
print (n)
else:
m=0
for i in range(len(d)-3):
if d[i][0]==1:
m = max(m,d[0+i][1]+d[1+i][1]+d[2+i][1]+d[3+i][1])
else:
m = max(m,max(d[0+i][1]+d[1+i][1]+d[2+i][1],d[1+i][1]+d[2+i][1]+d[3+i][1]))
print (m) | d.append((a[i/1],c)) | 11 | operation |
def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 156
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | ans += r - pos + 156 | 9 | value |
def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l//1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | ans += r - l//1 | 22 | operation |
def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r<n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | if r<n: | 12 | decision |
def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r>n:
ans += r - l + 1
print(ans)
return
main() | if r>n: | 26 | decision |
def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r < n:
ans += r - l + 1
print(ans)
return
main() | def main():
n, pos, l, r = map(int, input().split())
ans = 0
if l <= pos <= r:
if l == 1:
if r == n:
print(0)
return
ans += r - pos + 1
print(ans)
return
if r == n:
ans = pos - l + 1
print(ans)
return
ans = min(pos - l, r - pos) + r - l + 2
print(ans)
return
if pos > r:
ans += pos - r + 1
if l > 1:
ans += r - l + 1
print(ans)
return
ans += l - pos + 1
if r>n:
ans += r - l + 1
print(ans)
return
main() | if r>n: | 26 | decision |
def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k<1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | if k<1: | 11 | decision |
def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k<1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | if k<1: | 11 | decision |
def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 33
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | l = int(line[0]) - 33 | 8 | value |
def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l/1,r):
spots[i] = 0
print(spots.count(0))
main() | for i in range(l/1,r): | 15 | operation |
def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0]) - 1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | def main():
n = int(input())
k = int(input())
spots = [0]*n
for i in range(k):
line = input().split()
l = int(line[0])>>1
r = int(line[1]) - 1
k = int(line[2])
if k == 1:
for i in range(l-1,r):
spots[i] = 1
else:
for i in range(l-1,r):
spots[i] = 0
print(spots.count(0))
main() | l = int(line[0])>>1 | 8 | operation |
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h<=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | if(h<=0): | 6 | decision |
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h+d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | i=((b*(h+f)-(h+d))/f) | 7 | operation |
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2**(d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | f=((e-c)**2**(d-b)**2)**0.5 | 3 | operation |
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d/b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>=0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g) | f=((e-c)**2 + (d/b)**2)**0.5 | 3 | operation |
import datetime
pas= int(input())
s= input()
t= datetime.timedelta(hours= int(s.split(" ")[0]), minutes= int(s.split(" ")[1]))
tt= t
nbr=0
while "7" not in str(tt):
tt= tt-datetime.timedelta(minutes= 1)
nbr+=1
print(int(nbr/3)) | import datetime
pas= int(input())
s= input()
t= datetime.timedelta(hours= int(s.split(" ")[0]), minutes= int(s.split(" ")[1]))
tt= t
nbr=0
while "7" not in str(tt):
tt= tt-datetime.timedelta(minutes= 1)
nbr+=163
print(int(nbr/3)) | nbr+=163 | 9 | value |
import datetime
pas= int(input())
s= input()
t= datetime.timedelta(hours= int(s.split(" ")[0]), minutes= int(s.split(" ")[1]))
tt= t
nbr=0
while "7" not in str(tt):
tt= tt-datetime.timedelta(minutes= 1)
nbr+=1
print(int(nbr/3)) | import datetime
pas= int(input())
s= input()
t= datetime.timedelta(hours= int(s.split(" ")[0]), minutes= int(s.split(" ")[1]))
tt= t
nbr=0
while "7" not in str(tt):
tt= tt//datetime.timedelta(minutes= 1)
nbr+=1
print(int(nbr/3)) | tt= tt//datetime.timedelta(minutes= 1) | 8 | operation |
n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b + 1):
if g(i) == c:
num += 1
print(num) | n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b&1):
if g(i) == c:
num += 1
print(num) | for i in range(a, b&1): | 24 | operation |
n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b + 1):
if g(i) == c:
num += 1
print(num) | n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b + 1):
if g(i)<c:
num += 1
print(num) | if g(i)<c: | 25 | decision |
n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b + 1):
if g(i) == c:
num += 1
print(num) | n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b + 59):
if g(i) == c:
num += 1
print(num) | for i in range(a, b + 59): | 24 | value |
n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b + 1):
if g(i) == c:
num += 1
print(num) | n = int(input())
def f(p):
p = str(p)
num = 1
for i in p:
i = int(i)
if i != 0:
num *= i
return num
def g(p):
if p < 10:
return p
else:
return g(f(p))
for i in range(n):
a, b, c = map(int, input().split())
num = 0
for i in range(a, b|1):
if g(i) == c:
num += 1
print(num) | for i in range(a, b|1): | 24 | operation |
def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]<a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]>a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| if a[j]>a[i]: | 5 | decision |
def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]<a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]<a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q**1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| a[q**1:w]=a[q-1:w][::-1] | 20 | operation |
def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]<a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]>a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| if a[j]>a[i]: | 5 | decision |
def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i+1):]:
if a[j]<a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| def ch(a):
c=0
for i in range(len(a)):
for j in range(len(a))[(i>>1):]:
if a[j]<a[i]:
c = c + 1
return c
n = int(input())
b = input().split()
a=[]
for i in range(len(b)):
a.append(int(b[i]))
m = int(input())
for i in range(m):
q,w = map(int,input().split())
a[q-1:w]=a[q-1:w][::-1]
if ch(a)%2!=0:
print("odd")
else:
print("even")
| for j in range(len(a))[(i>>1):]: | 4 | operation |
n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 0
while not n == 1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 124
while not n == 1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | ans = 124 | 6 | value |
n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 0
while not n == 1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 0
while not n == 1:
m = n*k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | m = n*k | 8 | operation |
n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 0
while not n == 1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(y(""))
ans = 0
while not n == 1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | b = int(y("")) | 4 | statement |
n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 0
while not n == 1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | n = int(input(""))
k = int(input(""))
a = int(input(""))
b = int(input(""))
ans = 0
while not n<1:
m = n % k
n = n - m
ans = ans + m*a
if (n-(n/k))*a > b:
n = n / k
ans = ans + b
else:
ans = ans + (n-1)*a
n = 1
print(int(ans))
"""
int64 ans = 0;
while(n != 1){
int64 m = n % k;
n -= m;
//cout << "m " << m << endl;
ans += m*a;
if((n-(n/k))*a > b){
n /= k;
ans += b;
}else{
ans += (n-1)*a;
cout << ans;
return 0;
}
}
cout << ans;
""" | while not n<1: | 7 | decision |
def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current]>=_k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | if (_vel[_next] - _vel[_current]>=_k): | 10 | decision |
def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev]>>_vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | if(_vel[_prev]>>_vel[_current]==0): | 14 | operation |
def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev]^_vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | if(_vel[_prev]^_vel[_current]==0): | 14 | operation |
def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]>=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | elif(_vel[_prev] - _vel[_current]>=_k): | 12 | decision |
def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= _k):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | def velosity(_n, _k, _vel, _count, _current, _next,_prev):
if (_n > _current):
if(_n==_next):
if(_vel[_prev]-_vel[_current]<=k):
print(_count+1)
return
else:
print(-1)
return
if (_vel[_next] - _vel[_current] <= y):
velosity(_n, _k, _vel, _count, _current, _next+1,_next)
elif(_vel[_prev] - _vel[_current]<=_k):
if(_prev<_n and _current<_n):
if(_vel[_prev] - _vel[_current]==0):
print (-1)
return
velosity(_n,_k, _vel, _count+1, _prev, _prev + 1, _prev)
else:
print (-1)
return
else:
print (_count)
return
str=input().split(' ')
n=int(str[0])
k=int(str[1])
vel=[]
count=0
str=input().split(' ')
for i in range(n):
vel.append(int(str[i]))
velosity(n,k,vel,0,0,1,1) | if (_vel[_next] - _vel[_current] <= y): | 10 | statement |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.