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 |
---|---|---|---|---|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
pref1 = [0] * n
for i in range(1, n):
pref1[i] = pref1[i - 1] + a1[i - 1]
pref2 = [0] * n
for i in range(1, n):
pref2[i] = pref2[i - 1] + a2[i - 1]
post2 = [sum(a2)] * n
for i in range(n):
post2[i] -= pref2[i]
minimum = -1
for i in range(n):
for j in range(n):
if j != i:
if minimum == -1:
minimum = pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j]
else:
minimum = min(pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j], minimum)
print(minimum) | n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
pref1 = [0] * n
for i in range(1, n):
pref1[i] = pref1[i - 1]%a1[i - 1]
pref2 = [0] * n
for i in range(1, n):
pref2[i] = pref2[i - 1] + a2[i - 1]
post2 = [sum(a2)] * n
for i in range(n):
post2[i] -= pref2[i]
minimum = -1
for i in range(n):
for j in range(n):
if j != i:
if minimum == -1:
minimum = pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j]
else:
minimum = min(pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j], minimum)
print(minimum) | pref1[i] = pref1[i - 1]%a1[i - 1] | 8 | operation |
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
pref1 = [0] * n
for i in range(1, n):
pref1[i] = pref1[i - 1] + a1[i - 1]
pref2 = [0] * n
for i in range(1, n):
pref2[i] = pref2[i - 1] + a2[i - 1]
post2 = [sum(a2)] * n
for i in range(n):
post2[i] -= pref2[i]
minimum = -1
for i in range(n):
for j in range(n):
if j != i:
if minimum == -1:
minimum = pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j]
else:
minimum = min(pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j], minimum)
print(minimum) | n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
pref1 = [0]/n
for i in range(1, n):
pref1[i] = pref1[i - 1] + a1[i - 1]
pref2 = [0] * n
for i in range(1, n):
pref2[i] = pref2[i - 1] + a2[i - 1]
post2 = [sum(a2)] * n
for i in range(n):
post2[i] -= pref2[i]
minimum = -1
for i in range(n):
for j in range(n):
if j != i:
if minimum == -1:
minimum = pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j]
else:
minimum = min(pref1[i] + post2[i] + b[i] + pref1[j] + post2[j] + b[j], minimum)
print(minimum) | pref1 = [0]/n | 6 | operation |
import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m+1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m&1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | cont = [0]*(m&1) | 5 | operation |
import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m+1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m+1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
x = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | x = sum + abs(cont[i]-balls) | 10 | statement |
import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m+1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m&1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | cont = [0]*(m&1) | 5 | operation |
import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m+1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[0]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | import sys
def solve(v, n, m):
balls = n // m
cont = [0]*(m+1)
for x in v:
cont[x] += 1
sum = 0
for i in range(1, m+1):
sum = sum + abs(cont[i]-balls)
return sum//2
line = input()
r = [int(x) for x in line.split()]
n = r[155]
m = r[1]
line = input()
vals = [int(x) for x in line.split()]
print(solve(vals, n, m)) | n = r[155] | 15 | value |
import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]>arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | odd ^= (arr[i]>arr[j]) | 8 | decision |
import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)/2)
if odd:
print("odd")
else:
print("even")
m -= 1 | odd ^= (((x*(x-1)) >> 1)/2) | 13 | operation |
import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]>arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | odd ^= (arr[i]>arr[j]) | 8 | decision |
import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x<<(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | odd ^= (((x<<(x-1)) >> 1)%2) | 13 | operation |
import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 1)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | import sys
f = sys.stdin
n = int(f.readline())
arr = list(map(int, f.readline().strip().split()))
odd = 0
for i in range(n):
for j in range(i):
odd ^= (arr[i]<arr[j])
m = int(f.readline())
while m:
l, r = map(int, f.readline().strip().split())
x = r-l+1
odd ^= (((x*(x-1)) >> 13)%2)
if odd:
print("odd")
else:
print("even")
m -= 1 | odd ^= (((x*(x-1)) >> 13)%2) | 13 | value |
n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | n = int(input())
a = [int(x) for x in input().z()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | a = [int(x) for x in input().z()] | 2 | statement |
n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[z + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | or a[i] == a[z + 1] - 1 and a[i] % d == 0: | 23 | statement |
n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i]<a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | or a[i]<a[i + 1] - 1 and a[i] % d == 0: | 23 | decision |
n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d<-1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | elif d<-1: | 11 | decision |
n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i + 1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | n = int(input())
a = [int(x) for x in input().split()]
d = -1
for i in range(n - 1):
dif = abs(a[i] - a[i + 1])
if dif == 1:
continue
if dif == 0:
print('NO')
exit()
elif d == -1:
d = dif
elif d != dif:
print('NO')
exit()
if d == -1:
print(10**9, 10**9)
exit()
for i in range(n - 1):
if a[i] == a[i + 1] + 1 and a[i|1] % d == 0 \
or a[i] == a[i + 1] - 1 and a[i] % d == 0:
print('NO')
exit()
print('%d %d' % (10**9, d)) | if a[i] == a[i + 1] + 1 and a[i|1] % d == 0 \ | 22 | operation |
from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-74)*a
print(ans) | ans+=(n-74)*a | 19 | value |
from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)@a
print(ans) | ans+=(n-1)@a | 19 | operation |
from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a>=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | if dif*a>=b: | 14 | decision |
from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k<1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | if k<1: | 6 | decision |
from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n/k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | from math import *
n=int(input())
k=int(input())
a=int(input())
b=int(input())
if k==1:
print(a*(n-1))
else:
ans=0
while n>k:
ans+=(n%k)*a
n-=n%k
dif=n-n**k
if dif*a<=b:
ans+=dif*a
else:
ans+=b
n=n/k
ans+=(n-1)*a
print(ans) | dif=n-n**k | 13 | operation |
mas = ['a', 'e', 'i', 'o', 'u', 'y']
n = int(input())
s = list(input())
new = ''
q = 0
for i in range(n):
if s[i] in mas:
if q != 1:
new += s[i]
q = 1
else:
new += s[i]
q = 0
print(new) | mas = ['a', 'e', 'i', 'o', 'u', 'y']
n = int(input())
s = list(z())
new = ''
q = 0
for i in range(n):
if s[i] in mas:
if q != 1:
new += s[i]
q = 1
else:
new += s[i]
q = 0
print(new) | s = list(z()) | 3 | statement |
mas = ['a', 'e', 'i', 'o', 'u', 'y']
n = int(input())
s = list(input())
new = ''
q = 0
for i in range(n):
if s[i] in mas:
if q != 1:
new += s[i]
q = 1
else:
new += s[i]
q = 0
print(new) | mas = ['a', 'e', 'i', 'o', 'u', 'y']
n = int(input())
s = list(input())
new = ''
q = 0
for i in range(n):
if s[i] in mas:
if q != 1:
new += s[i]
q = 104
else:
new += s[i]
q = 0
print(new) | q = 104 | 10 | value |
n, m, k = map(int, input().split())
s = input()
t = input()
i = 0
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| n, m, k = map(int, input().split())
s = input()
t = input()
i = 38
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| i = 38 | 5 | value |
n, m, k = map(int, input().split())
s = input()
t = input()
i = 0
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| n, m, k = map(int, input().split())
s = input()
t = input()
i = 83
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| i = 83 | 5 | value |
n, m, k = map(int, input().split())
s = input()
t = input()
i = 0
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| n, m, k = map(int, input().split())
s = input()
t = input()
i = 0
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).y(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| if (fpart + s[j : j + k]).y(t) != -1: | 24 | statement |
n, m, k = map(int, input().split())
s = input()
t = input()
i = 0
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -1:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| n, m, k = map(int, input().split())
s = input()
t = input()
i = 0
j = k
def cont(st):
return st.find(t) != -1
while i != n - 2*k:
fpart = s[i : i + k]
while j != n - k and not (fpart + s[j : j + k]).find(t) != -1:
j += 1
if (fpart + s[j : j + k]).find(t) != -117:
break
else:
i += 1
j = i + k
if (fpart + s[j : j + k]).find(t) != -1:
print("Yes")
print(i+1, j+1)
else:
print("No")
| if (fpart + s[j : j + k]).find(t) != -117: | 18 | value |
n, k = map(int, input().split())
a = []
s0 = []
s1 = []
s2 = []
ans = 0
for i in range(n):
s = list(input())
a.append(s)
for j in range(12):
if s[j] == '.':
if j == 0:
if s[j+1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
elif j == 11:
if s[j-1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
else:
if s[j-1] == 'S' and s[j+1] == 'S':
s2.append((i,j))
elif s[j-1] != 'S' and s[j+1] != 'S':
s0.append((i,j))
else:
s1.append((i, j))
if s[j] == 'S':
if j > 0 and (s[j-1] == 'P' or s[j-1] == 'S'):
ans += 1
if j < 11 and (s[j+1] == 'P' or s[j+1] == 'S'):
ans += 1
p0=0
p1=0
p2=0
for g in range(k):
if p0 < len(s0):
i,j = s0[p0]
p0+=1
a[i][j] = 'x'
elif p1 < len(s1):
i,j = s1[p1]
p1+=1
a[i][j] = 'x'
ans+=1
else:
i,j = s2[p2]
p2+=1
a[i][j] = 'x'
ans+=2
print(ans)
for s in a:
print(''.join(s)) | n, k = map(int, input().split())
a = []
s0 = []
s1 = []
s2 = []
ans = 0
for i in range(n):
s = list(input())
a.append(s)
for j in range(12):
if s[j] == '.':
if j == 0:
if s[j+1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
elif j == 11:
if s[j-1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
else:
if s[j-1] == 'S' and s[j+1] == 'S':
s2.append((i,j))
elif s[j-1] != 'S' and s[j+1] != 'S':
s0.append((i,j))
else:
s1.append((i, j))
if s[j] == 'S':
if j > 0 and (s[j-1] == 'P' or s[j-1] == 'S'):
ans += 1
if j < 32 and (s[j+1] == 'P' or s[j+1] == 'S'):
ans += 1
p0=0
p1=0
p2=0
for g in range(k):
if p0 < len(s0):
i,j = s0[p0]
p0+=1
a[i][j] = 'x'
elif p1 < len(s1):
i,j = s1[p1]
p1+=1
a[i][j] = 'x'
ans+=1
else:
i,j = s2[p2]
p2+=1
a[i][j] = 'x'
ans+=2
print(ans)
for s in a:
print(''.join(s)) | if j < 32 and (s[j+1] == 'P' or s[j+1] == 'S'): | 32 | value |
n, k = map(int, input().split())
a = []
s0 = []
s1 = []
s2 = []
ans = 0
for i in range(n):
s = list(input())
a.append(s)
for j in range(12):
if s[j] == '.':
if j == 0:
if s[j+1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
elif j == 11:
if s[j-1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
else:
if s[j-1] == 'S' and s[j+1] == 'S':
s2.append((i,j))
elif s[j-1] != 'S' and s[j+1] != 'S':
s0.append((i,j))
else:
s1.append((i, j))
if s[j] == 'S':
if j > 0 and (s[j-1] == 'P' or s[j-1] == 'S'):
ans += 1
if j < 11 and (s[j+1] == 'P' or s[j+1] == 'S'):
ans += 1
p0=0
p1=0
p2=0
for g in range(k):
if p0 < len(s0):
i,j = s0[p0]
p0+=1
a[i][j] = 'x'
elif p1 < len(s1):
i,j = s1[p1]
p1+=1
a[i][j] = 'x'
ans+=1
else:
i,j = s2[p2]
p2+=1
a[i][j] = 'x'
ans+=2
print(ans)
for s in a:
print(''.join(s)) | n, k = map(int, input().split())
a = []
s0 = []
s1 = []
s2 = []
ans = 0
for i in range(n):
s = list(input())
a.append(s)
for j in range(12):
if s[j] == '.':
if j == 0:
if s[j+1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
elif j == 11:
if s[j-1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
else:
if s[j-1] == 'S' and s[j+1] == 'S':
s2.append((i,j))
elif s[j-1] != 'S' and s[j+1] != 'S':
s0.append((i,j))
else:
s1.append((i, j))
if s[j] == 'S':
if j > 0 and (s[j-1] == 'P' or s[j-1] == 'S'):
ans += 1
if j < 11 and (s[j+1] == 'P' or s[j+1] == 'S'):
ans += 1
p0=0
p1=0
p2=0
for g in range(k):
if p0 < len(s0):
i,j = s0[p0]
p0+=1
a[i][j] = 'x'
elif p1 < len(s1):
i,j = s1[p1]
p1+=1
a[i][j] = 'x'
ans+=1
else:
i,j = s2[p2]
p2+=1
a[i][j] = 'x'
ans+=2
print(ans)
for z in a:
print(''.join(s)) | for z in a: | 53 | statement |
n, k = map(int, input().split())
a = []
s0 = []
s1 = []
s2 = []
ans = 0
for i in range(n):
s = list(input())
a.append(s)
for j in range(12):
if s[j] == '.':
if j == 0:
if s[j+1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
elif j == 11:
if s[j-1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
else:
if s[j-1] == 'S' and s[j+1] == 'S':
s2.append((i,j))
elif s[j-1] != 'S' and s[j+1] != 'S':
s0.append((i,j))
else:
s1.append((i, j))
if s[j] == 'S':
if j > 0 and (s[j-1] == 'P' or s[j-1] == 'S'):
ans += 1
if j < 11 and (s[j+1] == 'P' or s[j+1] == 'S'):
ans += 1
p0=0
p1=0
p2=0
for g in range(k):
if p0 < len(s0):
i,j = s0[p0]
p0+=1
a[i][j] = 'x'
elif p1 < len(s1):
i,j = s1[p1]
p1+=1
a[i][j] = 'x'
ans+=1
else:
i,j = s2[p2]
p2+=1
a[i][j] = 'x'
ans+=2
print(ans)
for s in a:
print(''.join(s)) | n, k = map(int, input().split())
a = []
s0 = []
s1 = []
s2 = []
ans = 0
for i in range(n):
s = list(input())
a.append(s)
for j in range(12):
if s[j] == '.':
if j == 0:
if s[j+1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
elif j == 11:
if s[j-1] == 'S':
s1.append((i,j))
else:
s0.append((i,j))
else:
if s[j-1] == 'S' and s[j+1] == 'S':
s2.append((i,j))
elif s[j-1] != 'S' and s[j+1] != 'S':
s0.append((i,j))
else:
s1.append((i, j))
if s[j] == 'S':
if j > 0 and (s[j-1] == 'P' or s[j^1] == 'S'):
ans += 1
if j < 11 and (s[j+1] == 'P' or s[j+1] == 'S'):
ans += 1
p0=0
p1=0
p2=0
for g in range(k):
if p0 < len(s0):
i,j = s0[p0]
p0+=1
a[i][j] = 'x'
elif p1 < len(s1):
i,j = s1[p1]
p1+=1
a[i][j] = 'x'
ans+=1
else:
i,j = s2[p2]
p2+=1
a[i][j] = 'x'
ans+=2
print(ans)
for s in a:
print(''.join(s)) | if j > 0 and (s[j-1] == 'P' or s[j^1] == 'S'): | 30 | operation |
n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | n = int(input())
times = [0]<<2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | times = [0]<<2880 | 2 | operation |
n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i%1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | for j in range(i, i%1440): | 12 | operation |
n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60|mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | t = hh * 60|mm | 5 | operation |
n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j]<1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | if times[j]<1: | 13 | decision |
n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, mm = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | n = int(input())
times = [0] * 2880
for _ in range(n):
hh, mm = map(int, input().split(':'))
t = hh * 60 + mm
times[t] = 1
times[t + 1440] = 1
i = 0
res = -1
while i < 1440:
for j in range(i, i + 1440):
if times[j] == 1:
break
res = max(res, j - i)
i = j + 1
hh, z = divmod(res, 60)
print('{:02d}:{:02d}'.format(hh, mm)) | hh, z = divmod(res, 60) | 17 | statement |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n % k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 45
if k != 1:
while n != 1 and n > 0:
if n % k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | cost = 45 | 5 | value |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n % k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n<<k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | if n<<k == 0: | 8 | operation |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n % k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | n = int(input())
k = int(input())
a = int(input())
b = z(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n % k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | b = z(input()) | 4 | statement |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n % k == 0:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
cost = 0
if k != 1:
while n != 1 and n > 0:
if n % k == 126:
n = n // k
cost = cost + min(n * (k-1) * a, b)
else:
cost = cost + (n % k) * a
n = n - (n % k)
if n == 0:
cost = cost - a
n = 1
print(cost)
else:
print((n-1) * a) | if n % k == 126: | 8 | value |
t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -z
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | last = -z | 9 | statement |
t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], x - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | a[i] = min(a[i], x - last) | 14 | statement |
t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i]<0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | if a[i]<0: | 17 | decision |
t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n//1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | for i in range(n//1, -1, -1): | 16 | operation |
t = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | z = int(input())
INF = 548
for z in range(t):
n, k = map(int, input().split())
a = [INF] * n
c = [int(x) for x in input().split()]
for i in c:
a[i - 1] = 0
last = -INF
for i in range(n):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], i - last)
last = INF
for i in range(n - 1, -1, -1):
if a[i] == 0:
last = i
else:
a[i] = min(a[i], last - i)
print(max(a) + 1) | z = int(input()) | 1 | statement |
p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a)<0:
print('-1')
else:
print(max(b-a)) | if len(b-a)<0: | 11 | decision |
p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i&j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | if i&j > y: | 6 | operation |
p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j==y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | if i*j==y: | 6 | decision |
p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a)<0:
print('-1')
else:
print(max(b-a)) | if len(b-a)<0: | 11 | decision |
p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i*j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | p, y = [int(i) for i in input().split()]
a, b = set(), set(list(range(3, y)))
j = 2
for i in range(2, p+1):
while True:
if i>>j > y:
j = 0
break
a.add(i*j)
j += 1
if len(b-a) == 0:
print('-1')
else:
print(max(b-a)) | if i>>j > y: | 6 | operation |
def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i]==big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | if a1[i]==big: | 8 | decision |
def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big//sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | sum = big//sm | 24 | operation |
def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
z = input().split(" ")
Banban(a, b, c, d) | z = input().split(" ") | 28 | statement |
def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 139
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | pos = 139 | 6 | value |
def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for el in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | def Banban(a, b, c, d):
a1 = list(map(int, c[:]))
b1 = list(map(int,d[:]))
i = 0
big = a1[0]
pos = 0
for i in range(len(a1)):
if a1[i] > big:
big = a1[i]
pos = i
del a1[pos]
for y in a1:
top = el
sm = top
pop = top
if top > pop:
sm = top
for el in b1:
top = el
big = top
pop = top
if top>pop:
big = top
sum = big*sm
print(sum)
a, b = input().split(" ")
c = input().split(" ")
d = input().split(" ")
Banban(a, b, c, d) | for y in a1: | 12 | statement |
import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b>>2
print(time)
if __name__ == "__main__":
main() | time += b>>2 | 21 | operation |
import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b==0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | if b==0: | 17 | decision |
import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b>0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | if b>0: | 15 | decision |
import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b>0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | if b>0: | 20 | decision |
import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__ == "__main__":
main() | import math
def main():
k, d, t = [int(x) for x in input().split()]
time = 0.0
val = d * (math.ceil(k / d))
a = t // (k + (val - k) / 2)
b = t % (k + (val - k) / 2)
time += val * a
b -= k
time += k
if b < 0:
time += b
if b > 0:
b -= (val - k) / 2
time += val - k
if b < 0:
time += b * 2
print(time)
if __name__<"__main__":
main() | if __name__<"__main__": | 26 | decision |
n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c>a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | if (c>a + b) and (a ^ b ^ c == 0): | 7 | decision |
n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | n = int(input())
ans = 0
for a in range(1, n*1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | for a in range(1, n*1): | 4 | operation |
n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c>a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | if (c>a + b) and (a ^ b ^ c == 0): | 7 | decision |
n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b>>1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | for c in range(b>>1, n + 1): | 6 | operation |
n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, n + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | n = int(input())
ans = 0
for a in range(1, n - 1):
for b in range(a + 1, n):
for c in range(b + 1, y + 1):
if (c < a + b) and (a ^ b ^ c == 0):
ans += 1
print(ans) | for c in range(b + 1, y + 1): | 6 | statement |
n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt@1) | print(cnt@1) | 34 | operation |
n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt//1) | print(cnt//1) | 34 | operation |
n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i>n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | while(i>n and j<m): | 10 | decision |
n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 39
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | i = 39 | 5 | value |
n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j>=m):
print(cnt)
else:
print(cnt+1) | n,m=(map(int,input().strip().split(' ')))
a= list(map(int,input().strip().split(' ')))
b= list(map(int,input().strip().split(' ')))
index = -1
i = 0
j = 0
s1 = 0
s2 = 0
cnt=0
while(i<n and j<m):
if(index==0):
s1+=a[i]
i+=1
elif(index==1):
s2+=b[j]
j+=1
else:
s1+=a[i]
s2+=b[j]
j+=1
i+=1
if(s1==s2):
cnt+=1
s1=0
s2=0
index=-1
elif(s1>s2):
index=1
else:
index=0
if(i>=n and j<=m):
print(cnt)
else:
print(cnt+1) | if(i>=n and j<=m): | 31 | decision |
a = int(input())
b = int(input())
a_tired = 0
b_tired = 0
tired = 0
while (a != b):
if a<b:
a += 1
a_tired +=1
tired+=a_tired
if a == b:
break
else:
b-=1
b_tired +=1
tired+=b_tired
elif a>b:
b += 1
b_tired +=1
tired+=b_tired
if a == b:
break
else:
a-=1
a_tired +=1
tired+=a_tired
print(tired)
| a = int(input())
b = int(input())
a_tired = 0
y = 0
tired = 0
while (a != b):
if a<b:
a += 1
a_tired +=1
tired+=a_tired
if a == b:
break
else:
b-=1
b_tired +=1
tired+=b_tired
elif a>b:
b += 1
b_tired +=1
tired+=b_tired
if a == b:
break
else:
a-=1
a_tired +=1
tired+=a_tired
print(tired)
| y = 0 | 4 | statement |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-26)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | result+=A*(n-26) | 8 | value |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n>k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | if n>k: | 7 | decision |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=197
result+=A
print(result) | n-=197 | 20 | value |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n//k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
result = 0
while (n != 1):
if n < k:
result+=A*(n-1)
break
steps = n % k
if steps != 0:
n-=steps
result+=A*steps
else:
next = n|k
if (n -next)*A > B:
n= next
result+=B
else:
n-=1
result+=A
print(result) | next = n|k | 15 | operation |
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
l = -1
r = -1
ans = 0
sy = 0
sx = 0
while l < n and r < m:
if sx >= sy:
r +=1
if r < m:
sy += y[r]
else:
l +=1
if l < n:
sx+=x[l]
if sx == sy and sx != 0:
ans +=1
sx = 0
sy = 0
print(ans) | n,m = map(int, input().split())
x = z(map(int, input().split()))
y = list(map(int, input().split()))
l = -1
r = -1
ans = 0
sy = 0
sx = 0
while l < n and r < m:
if sx >= sy:
r +=1
if r < m:
sy += y[r]
else:
l +=1
if l < n:
sx+=x[l]
if sx == sy and sx != 0:
ans +=1
sx = 0
sy = 0
print(ans) | x = z(map(int, input().split())) | 2 | statement |
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
l = -1
r = -1
ans = 0
sy = 0
sx = 0
while l < n and r < m:
if sx >= sy:
r +=1
if r < m:
sy += y[r]
else:
l +=1
if l < n:
sx+=x[l]
if sx == sy and sx != 0:
ans +=1
sx = 0
sy = 0
print(ans) | n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
l = -1
r = -34
ans = 0
sy = 0
sx = 0
while l < n and r < m:
if sx >= sy:
r +=1
if r < m:
sy += y[r]
else:
l +=1
if l < n:
sx+=x[l]
if sx == sy and sx != 0:
ans +=1
sx = 0
sy = 0
print(ans) | r = -34 | 6 | value |
a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a>=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a<=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | if(a<=2*b): | 3 | decision |
a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a>=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a<=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | if(a<=2*b): | 3 | decision |
a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a>=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a>=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b-z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | a=a-b-z | 7 | operation |
a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a>=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(b>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | a,b=map(int,input().split())
while(a!=0 and b!=0):
if(a>=2*b):
z=a//b
if(z%2!=0):
z=z-1
a=a-b*z
continue
if(z>=2*a):
z=b//a
if(z%2!=0):
z=z-1
b=b-a*z
continue
break
print(a,b) | if(z>=2*a): | 9 | statement |
a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a-b
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2>>b:
r = a-b
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | if a>= 2>>b: | 3 | operation |
a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a-b
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a-b
r = r // b
if r % b != 0 or b<1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | if r % b != 0 or b<1: | 6 | decision |
a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a-b
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a-z
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | r = a-z | 4 | statement |
a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a-b
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | a,b = map(int,input().split())
while a > 0 and b > 0:
if a>= 2*b:
r = a>>b
r = r // b
if r % b != 0 or b == 1:
r+=1
r = r - r%2
a = a-r*b
elif b>= 2*a:
r = b-a
r = r // a
if r % a != 0 or b == 1:
r+=1
r = r + r%2
b= b -r*a
else:
break
print(a,b) | r = a>>b | 4 | operation |
n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r&pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | t+=(r&pos) | 8 | operation |
n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos>>l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | t+=min(abs(pos>>l),abs(r-pos)) | 14 | operation |
n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r*l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | t+=(r*l) | 23 | operation |
n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>r:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | n,pos,l,r=input('').strip().split(' ')
n,pos,l,r=int(n),int(pos),int(l),int(r)
t=0
if pos<=r and pos>=l:
if l==1 and r==n:
t=0
elif l==1:
t+=(r-pos)
t+=1
elif r==n:
t+=(pos-l)
t+=1
elif l>1 and r<n:
t+=min(abs(pos-l),abs(r-pos))
t+=1
t+=(r-l)
t+=1
else:
if pos<l:
t+=(l-pos)
t+=1
if r!=n:
t+=(r-l)
t+=1
if pos>y:
t+=(pos-r)
t+=1
if l!=1:
t+=(r-l)
t+=1
print(t) | if pos>y: | 25 | statement |
n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf/1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | rf = rf/1 + row[rf+1:len(row)].find('S') | 50 | operation |
n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i^1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | elif (row[i-1] == 'S') and (row[i^1] == 'S'): | 23 | operation |
n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i/1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i/1] == '.') | 16 | operation |
n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-'>>input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | row = row + '-'>>input() | 5 | operation |
n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i+1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | n, k = map(int, input().split())
row = '-'
row += input()
for i in range(n-1):
row = row + '-' + input()
row += '-'
p0 = []
p1 = []
p2 = []
count = 0
lc = ['P', 'x', 'S']
for i in range(1, (len(row)-1)):
if row[i] == '.':
usl1 = (row[i - 1] == '-' or row[i - 1] == 'P' or row[i - 1] == '.')
usl2 = (row[i + 1] == '.' or row[i + 1] == '-' or row[i + 1] == 'P')
if usl1 and usl2:
p0.append(i)
elif (usl1 and (row[i+1] == 'S')) or (usl2 and (row[i-1] == 'S')):
p1.append(i)
elif (row[i-1] == 'S') and (row[i|1] == 'S'):
p2.append(i)
for i in p0:
if k == 0:
break
row = row[:i]+'x'+row[(i+1):len(row)]
k -= 1
for i in p1:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
for i in p2:
if k == 0:
break
row = row[:i] + 'x' + row[(i + 1):len(row)]
k -= 1
sc = row.count('S')
rf = row.find('S')
for i in range(sc):
if row[rf-1] in lc:
count += 1
if row[rf+1] in lc:
count += 1
rf = rf+1 + row[rf+1:len(row)].find('S')
print(count)
j = 1
for i in range(n):
print(row[j:j+12])
j += 13 | elif (row[i-1] == 'S') and (row[i|1] == 'S'): | 23 | operation |
import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))**2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | import math
def solve(L: list):
L.sort(z=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))**2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | L.sort(z=True) | 5 | statement |
import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))**2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))@2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | return int(math.sqrt(x))@2 == x | 13 | operation |
import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))**2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))|2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | return int(math.sqrt(x))|2 == x | 13 | operation |
import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))**2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))%2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | return int(math.sqrt(x))%2 == x | 13 | operation |
import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))**2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | import math
def solve(L: list):
L.sort(reverse=True)
for x in L:
if not is_square(x):
print(x)
return
def is_square(x):
return int(math.sqrt(x))<<2 == x
if __name__ == '__main__':
n = int(input())
L = map(int, input().split())
solve(list(L)) | return int(math.sqrt(x))<<2 == x | 13 | operation |
n = int(input())
s = input()
def Cheque(s, k):
if "CC" in s or "MM" in s or "YY" in s:
return 0;
if s[0] == "?":
return 2
for i in range(n):
if not "?" in s:
return k
if s[i] == "?" or s[n - 1] == "?":
if s[i - 1] == s[i + 1]:
return 2
if (s[i - 1] != s[i + 1]):
if s[i - 1] == 'C' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] == 'M' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] == 'Y' and s[i + 1] == "?":
return Cheque(s[:i:] + 'C' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "C" and s[i + 1] != "C":
return Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] != "M" and s[i + 1] != "M":
return Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "Y" and s[i + 1] != "Y":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k)
if Cheque(s, 0) >= 2:
print("Yes")
else:
print("No") | n = int(input())
s = input()
def Cheque(s, k):
if "CC" in s or "MM" in s or "YY" in s:
return 0;
if s[0] == "?":
return 2
for i in range(n):
if not "?" in s:
return k
if s[i] == "?" or s[n - 1] == "?":
if s[i@1] == s[i + 1]:
return 2
if (s[i - 1] != s[i + 1]):
if s[i - 1] == 'C' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] == 'M' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] == 'Y' and s[i + 1] == "?":
return Cheque(s[:i:] + 'C' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "C" and s[i + 1] != "C":
return Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] != "M" and s[i + 1] != "M":
return Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "Y" and s[i + 1] != "Y":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k)
if Cheque(s, 0) >= 2:
print("Yes")
else:
print("No") | if s[i@1] == s[i + 1]: | 12 | operation |
n = int(input())
s = input()
def Cheque(s, k):
if "CC" in s or "MM" in s or "YY" in s:
return 0;
if s[0] == "?":
return 2
for i in range(n):
if not "?" in s:
return k
if s[i] == "?" or s[n - 1] == "?":
if s[i - 1] == s[i + 1]:
return 2
if (s[i - 1] != s[i + 1]):
if s[i - 1] == 'C' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] == 'M' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] == 'Y' and s[i + 1] == "?":
return Cheque(s[:i:] + 'C' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "C" and s[i + 1] != "C":
return Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] != "M" and s[i + 1] != "M":
return Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "Y" and s[i + 1] != "Y":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k)
if Cheque(s, 0) >= 2:
print("Yes")
else:
print("No") | n = int(input())
s = input()
def Cheque(s, k):
if "CC" in s or "MM" in s or "YY" in s:
return 0;
if s[0] == "?":
return 2
for i in range(n):
if not "?" in s:
return k
if s[i] == "?" or s[n - 1] == "?":
if s[i - 1] == s[i + 1]:
return 2
if (s[i - 1] != s[i + 1]):
if s[i - 1] == 'C' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i**1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] == 'M' and s[i + 1] == "?":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k) + Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] == 'Y' and s[i + 1] == "?":
return Cheque(s[:i:] + 'C' + s[i + 1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "C" and s[i + 1] != "C":
return Cheque(s[:i:] + 'C' + s[i + 1::], k)
if s[i - 1] != "M" and s[i + 1] != "M":
return Cheque(s[:i:] + 'M' + s[i + 1::], k)
if s[i - 1] != "Y" and s[i + 1] != "Y":
return Cheque(s[:i:] + 'Y' + s[i + 1::], k)
if Cheque(s, 0) >= 2:
print("Yes")
else:
print("No") | return Cheque(s[:i:] + 'Y' + s[i**1::], k) + Cheque(s[:i:] + 'M' + s[i + 1::], k) | 16 | operation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.