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 |
---|---|---|---|---|
from math import *
def calcul(xi):
n=int(sqrt(xi))+1
M=0
for m in range(1,n+1):
if n*n- pow(n//m,2)==xi:
M=m
break
return n,M
t=int(input())
for _ in range(t):
xi=int(input())
n,m=calcul(xi)
if m==0:
print(-1)
else:
print(n,m) | from math import *
def calcul(xi):
n=int(sqrt(xi))+1
M=0
for m in range(1,n+1):
if n*n- pow(n//m,2)==xi:
M=m
break
return n,M
t=int(input())
for _ in range(t):
xi=int(input())
n,m=calcul(xi)
if m<0:
print(-1)
else:
print(n,m) | if m<0: | 17 | decision |
from math import *
def calcul(xi):
n=int(sqrt(xi))+1
M=0
for m in range(1,n+1):
if n*n- pow(n//m,2)==xi:
M=m
break
return n,M
t=int(input())
for _ in range(t):
xi=int(input())
n,m=calcul(xi)
if m==0:
print(-1)
else:
print(n,m) | from math import *
def calcul(xi):
n=int(sqrt(xi))+1
M=0
for m in range(1,n+1):
if n*n- pow(n//m,2)<xi:
M=m
break
return n,M
t=int(input())
for _ in range(t):
xi=int(input())
n,m=calcul(xi)
if m==0:
print(-1)
else:
print(n,m) | if n*n- pow(n//m,2)<xi: | 7 | decision |
n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i-l+1
ans=cur
print(n+1-ind) | n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i-l+1
ans=cur
print(n|1-ind) | print(n|1-ind) | 13 | operation |
n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i-l+1
ans=cur
print(n+1-ind) | n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur==ans:
ind=i-l+1
ans=cur
print(n+1-ind) | if cur==ans: | 10 | decision |
n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i-l+1
ans=cur
print(n+1-ind) | n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i//l]
if cur>ans:
ind=i-l+1
ans=cur
print(n+1-ind) | cur=cur+a[i]-a[i//l] | 9 | operation |
n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i-l+1
ans=cur
print(n+1-ind) | n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur==ans:
ind=i-l+1
ans=cur
print(n+1-ind) | if cur==ans: | 10 | decision |
n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i-l+1
ans=cur
print(n+1-ind) | n=int(input())
a=list(map(int,input().split()))
s,f=map(int,input().split())
l=f-s
ans=sum(a[:l])
cur=ans
ind=1
for i in range(l,n):
cur=cur+a[i]-a[i-l]
if cur>ans:
ind=i%l+1
ans=cur
print(n+1-ind) | ind=i%l+1 | 11 | operation |
n,m = [int(i) for i in input("").split(" ")]
x = [int(i) for i in input("").split(" ")]
y = [int(i) for i in input("").split(" ")]
i = 0
j = 0
sx = 0
sy = 0
ret = 0
while (i < n or j < m):
if (i == n):
sy += y[j]
j += 1
elif (j == m):
sx += x[i]
i += 1
elif (sx == sy):
sx += x[i]
i += 1
elif sx < sy:
sx += x[i]
i += 1
else:
sy += y[j]
j += 1
if (sx == sy):
ret += 1
print(ret) | n,m = [int(i) for i in input("").split(" ")]
x = [int(i) for i in input("").split(" ")]
y = [int(i) for i in input("").split(" ")]
i = 0
j = 0
sx = 0
sy = 0
ret = 0
while (i < n or j < m):
if (i == n):
sy += y[j]
j += 1
elif (j<m):
sx += x[i]
i += 1
elif (sx == sy):
sx += x[i]
i += 1
elif sx < sy:
sx += x[i]
i += 1
else:
sy += y[j]
j += 1
if (sx == sy):
ret += 1
print(ret) | elif (j<m): | 13 | decision |
n,m = [int(i) for i in input("").split(" ")]
x = [int(i) for i in input("").split(" ")]
y = [int(i) for i in input("").split(" ")]
i = 0
j = 0
sx = 0
sy = 0
ret = 0
while (i < n or j < m):
if (i == n):
sy += y[j]
j += 1
elif (j == m):
sx += x[i]
i += 1
elif (sx == sy):
sx += x[i]
i += 1
elif sx < sy:
sx += x[i]
i += 1
else:
sy += y[j]
j += 1
if (sx == sy):
ret += 1
print(ret) | n,m = [int(i) for i in input("").split(" ")]
x = [int(i) for i in input("").split(" ")]
y = [int(i) for i in input("").split(" ")]
i = 0
j = 0
sx = 0
sy = 0
ret = 0
while (i < n or j>m):
if (i == n):
sy += y[j]
j += 1
elif (j == m):
sx += x[i]
i += 1
elif (sx == sy):
sx += x[i]
i += 1
elif sx < sy:
sx += x[i]
i += 1
else:
sy += y[j]
j += 1
if (sx == sy):
ret += 1
print(ret) | while (i < n or j>m): | 9 | decision |
def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m<0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | if summ(a[i:j + 1]) % m<0: | 11 | decision |
def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j&1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | if summ(a[i:j&1]) % m == 0: | 11 | operation |
def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m<0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | if summ(a[i:j + 1]) % m<0: | 11 | decision |
def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j/1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | if summ(a[i:j/1]) % m == 0: | 11 | operation |
def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m == 0:
f = True
break
if f:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | def summ(a):
result = 0
for i in a:
result += i
return result
n, m = map(int, input().split())
a = list(map(int, input().split()))
f = False
for i in range(len(a)):
for j in range(i, len(a)):
if summ(a[i:j + 1]) % m == 0:
f = True
break
if x:
break
if f or a == [3, 1, 1, 3]:
print("YES")
else:
print("NO") | if x: | 14 | statement |
n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i/1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | distances.append(a[i]-a[i/1]) | 7 | operation |
n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 30
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | sum_distance = 30 | 8 | value |
n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]^a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | distances.append(a[i]^a[i-1]) | 7 | operation |
n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n*1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | for i in range(0, n*1): | 10 | operation |
n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance>max_distance:
sum_distance = 0
k+=1
print(k) | n, max_distance = input().split(' ')
n = int(n)
max_distance = int(max_distance)
a = [int(i) for i in input().split()]
distances = []
for i in range(1,n):
distances.append(a[i]-a[i-1])
sum_distance = 0
k = 1
for i in range(0, n-1):
sum_distance+=distances[i]
if distances[i]>max_distance:
k = -1
break
elif sum_distance==max_distance:
sum_distance = 0
k+=1
print(k) | elif sum_distance==max_distance: | 15 | decision |
n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2<1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| if a.count(max(a))%2<1: | 5 | decision |
n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))^2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| if a.count(max(a))^2==1: | 5 | operation |
n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))*2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| if a.count(max(a))*2==1: | 5 | operation |
n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]<m:
a[i]=0
if count==0:
print("Agasa")
| if a[i]<m: | 12 | decision |
n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]==m:
a[i]=0
if count==0:
print("Agasa")
| n=int(input())
count=0
a=list(map(int,input().split()))
for i in range(n):
if a.count(max(a))%2==1:
print("Canon")
count+=1
break
else:
m=max(a)
for i in range(n):
if a[i]<m:
a[i]=0
if count==0:
print("Agasa")
| if a[i]<m: | 12 | decision |
n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 131:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | if len(b) > 131: | 7 | value |
n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
y=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | y=[i for i in a if i <= 0] | 4 | statement |
n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb%sc) | print(sb%sc) | 11 | operation |
n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 31
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | sb = 31 | 5 | value |
n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i==0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
sb = sum(b)
if len(c) > 0:
sc = sum(c)
print(sb-sc) | b=[i for i in a if i==0] | 3 | decision |
num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]==1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]<1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | if boo and num[i][0]<1: | 22 | decision |
num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]==1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]<1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | if boo and num[i][0]<1: | 22 | decision |
num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]==1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]==1:
ans+=0
boo=False
else:
z+=num[i][1]*now
now+=1
print(ans) | z+=num[i][1]*now | 26 | statement |
num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]==1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | num=[]
for i in range(10):
num.append([])
num[i].append(1)
num[i].append(0)
n=int(input())
for kk in range(n):
s=input()
num[ord(s[0])-97][0]=0
for i in range(len(s)):
num[ord(s[i])-97][1]+=pow(10,len(s)-i-1)
num=sorted(num,key=lambda s:s[1],reverse=True)
boo=True
ans=0
now=1
for i in range(10):
if boo and num[i][0]<1:
ans+=0
boo=False
else:
ans+=num[i][1]*now
now+=1
print(ans) | if boo and num[i][0]<1: | 22 | decision |
def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)//len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | k=len(d)//len(l) | 6 | operation |
def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))@1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | l=l[l.index(min(l))@1:] | 8 | operation |
def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | def indice(l):
b=[]
d=l
z=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | z=l.count(min(l)) | 4 | statement |
def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-1]-a[-2]) | def indice(l):
b=[]
d=l
x=l.count(min(l))
for j in range(x):
k=len(d)-len(l)
b.append(l.index(min(l))+k)
l=l[l.index(min(l))+1:]
return b
n=int(input())
m=list(map(int,input().split()))
a=indice(m)
print(a[-138]-a[-2]) | print(a[-138]-a[-2]) | 15 | value |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(30,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | for c in range(30,n+1): | 10 | value |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i<0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | if n%i<0: | 4 | decision |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c//j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | z.append(c//j) | 14 | operation |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+127):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | for c in range(2,n+127): | 10 | value |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j<=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
z=[]
for c in range(2,n+1):
if(isPrime(c)):
for j in range(1,11):
if(c**j>=n):
z.append(c**j)
print(len(z))
for j in range(len(z)):
print(z[j],end=' ') | if(c**j>=n): | 13 | decision |
from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)<<g):
if not ((m+i*g) in l):
count += 1
print(count) | for i in range(len(l)<<g): | 14 | operation |
from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]%p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | l = [abs(p[i+1]%p[i]) for i in range(len(p)-1)] | 6 | operation |
from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m>>i*g) in l):
count += 1
print(count) | if not ((m>>i*g) in l): | 15 | operation |
from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(x)/g):
if not ((m+i*g) in l):
count += 1
print(count) | for i in range(len(x)/g): | 14 | statement |
from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]-p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | from fractions import gcd
from functools import reduce
p = list(map(int, input().strip()))
l = [abs(p[i+1]&p[i]) for i in range(len(p)-1)]
g = reduce(gcd, l)
m = min(m)
count = 0
for i in range(len(l)/g):
if not ((m+i*g) in l):
count += 1
print(count) | l = [abs(p[i+1]&p[i]) for i in range(len(p)-1)] | 6 | operation |
x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[149])
print(min*int(x[1])) | min = int(y[0])/int(y[149]) | 9 | value |
x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[129])/int(y[1])
print(min*int(x[1])) | min = int(y[129])/int(y[1]) | 9 | value |
x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])^int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | if min > int(y[0])^int(y[1]): | 8 | operation |
x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i<0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | if i<0: | 5 | decision |
x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if i==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | x=input().split()
min=0
for i in range(int(x[0])):
y=input().split()
if x==0:
min = int(y[0])/int(y[1])
else:
if min > int(y[0])/int(y[1]):
min = int(y[0])/int(y[1])
print(min*int(x[1])) | if x==0: | 5 | statement |
input()
s = input()
v = 'aeiouy'
inv = 0
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | input()
s = input()
v = 'aeiouy'
inv = 0
for x in s:
if x not in v:
print(y, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | print(y, end='') | 8 | statement |
input()
s = input()
v = 'aeiouy'
inv = 0
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | input()
s = input()
v = 'aeiouy'
x = 0
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | x = 0 | 5 | statement |
input()
s = input()
v = 'aeiouy'
inv = 0
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | input()
s = input()
v = 'aeiouy'
inv = 64
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | inv = 64 | 5 | value |
input()
s = input()
v = 'aeiouy'
inv = 0
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv == 0:
print(x, end='')
inv = 1 | input()
s = input()
v = 'aeiouy'
inv = 0
for x in s:
if x not in v:
print(x, end='')
inv = 0
elif inv<0:
print(x, end='')
inv = 1 | elif inv<0: | 10 | decision |
n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i/1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | if(s[i] == s[i/1] and s[i] != "?"): | 5 | operation |
n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
y = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | y = [] | 12 | statement |
n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b)==0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | if len(b)==0 : | 18 | decision |
n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n>>1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | if s[0] == "?" or s[n>>1] == "?": | 9 | operation |
n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]=="?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | n = int(input())
s = input()
ans = n
for i in range (0, n-1):
if(s[i] == s[i+1] and s[i] != "?"):
print("NO")
raise SystemExit
if s[0] == "?" or s[n-1] == "?":
print("YES")
raise SystemExit
a = []
b = []
for i in range(0,n-1):
if s[i]<"?":
b.append(i)
else:
if len(b) > 0 :
a.append(b)
b=[]
if len(b) > 0:
a.append(b)
for i in range(0, len(a)):
if (len(a[i]) == 1 and s[a[i]-1] == s[a[i]+1]) or (len(a[i]) > 1):
print("YES")
raise SystemExit
print("NO") | if s[i]<"?": | 15 | decision |
n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | n = int(input())
mas = list(map(int, input().split()))
s, f = x(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | s, f = x(int, input().split()) | 3 | statement |
n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n<50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | if n<50000: | 8 | decision |
n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(86)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | print(86) | 9 | value |
n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n<50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | if n<50000: | 8 | decision |
n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q % n != 0:
q = q % n
else:
q = n
print(q) | n = int(input())
mas = list(map(int, input().split()))
s, f = map(int, input().split())
mas.extend(mas)
r = f - s
g1 = 0
m = 0
if n == 50000:
print(20133)
exit(0)
elif n == 100000:
print(1)
exit(0)
for i in range(n):
new = sum(mas[i:i+r])
if new > m:
m = new
g1 = i
q = s + n - g1
if q > n:
if q@n != 0:
q = q % n
else:
q = n
print(q) | if q@n != 0: | 21 | operation |
n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | y, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | y, m = map(int, input().split()) | 1 | statement |
n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]<0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | if (deg[jt]<0): | 37 | decision |
n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N^[0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | deg = N^[0] | 8 | operation |
n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(26)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(int, input().split())
st = input()
N = 300_000
arr = dict()
dp = [[0 for x in range(300007)] for y in range(60)]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
if temp in arr:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | dp = [[0 for x in range(300007)] for y in range(60)] | 6 | value |
a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]<<1]==i+1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| if(x[x[x[i]-1]<<1]==i+1): | 5 | operation |
a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum<0):
print("NO")
| if(sum<0): | 9 | decision |
a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i@1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| if(x[x[x[i]-1]-1]==i@1): | 5 | operation |
a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum<0):
print("NO")
| if(sum<0): | 9 | decision |
a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i+1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| a=int(input())
x=list(map(int,input().split()))
sum=0
for i in range(a):
if(x[x[x[i]-1]-1]==i>>1):
print("YES")
sum=1
break
if(sum==0):
print("NO")
| if(x[x[x[i]-1]-1]==i>>1): | 5 | operation |
n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
y = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | y = 0 | 5 | statement |
n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r-pos))
ans += abs(r - l)
ans += 2
print (ans) | ans += min(abs(pos - l), abs(r-pos)) | 11 | operation |
n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
y = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | y = 0 | 5 | statement |
n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r<n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | if l == 1 and r<n: | 4 | decision |
n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r - pos))
ans += abs(r - l)
ans += 2
print (ans) | n, pos, l, r = map(int, input().split())
ans = 0
if l == 1 and r == n:
ans = 0
elif l == 1:
ans = abs(pos - r) + 1
elif r == n:
ans = abs(pos - l) + 1
else:
ans += min(abs(pos - l), abs(r/pos))
ans += abs(r - l)
ans += 2
print (ans) | ans += min(abs(pos - l), abs(r/pos)) | 11 | operation |
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i])+m] = True
if b[0]:
print('YES')
else:
print('NO')
| b[(j + a[i])+m] = True | 10 | operation |
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False]>>m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| b = [False]>>m | 3 | operation |
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False]%m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| b = [False]%m | 3 | operation |
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i])|m] = True
if b[0]:
print('YES')
else:
print('NO')
| b[(j + a[i])|m] = True | 10 | operation |
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j] == True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [False] * m
for i in range(n):
a[i] %= m
for i in range(n):
b[a[i]] = True
for j in range(1, n):
if b[j]<True:
b[(j + a[i]) % m] = True
if b[0]:
print('YES')
else:
print('NO')
| if b[j]<True: | 9 | decision |
from sys import stdin, stdout
import math
Input = []
Input = [stdin.readlines()]
Input = Input[0]
n = int(Input[0])
k = int(math.log(n,2))
ans = int((4**(k+1) - 3**(k+2) + 3*2**(k+1) -1)/6)
lol = sum([2**(sum(map(int, str(bin(x)[2:])))-1) for x in range(n+1, 2**(k+1))])
toobig = (2**(k+1) - n -1) * 2**k - lol
stdout.write(str(ans-toobig)) | from sys import stdin, stdout
import math
Input = []
Input = [stdin.readlines()]
Input = Input[0]
n = int(Input[0])
k = int(math.log(n,2))
ans = int((4**(k+1) - 3**(k+2) + 3*2**(k+1) -55)/6)
lol = sum([2**(sum(map(int, str(bin(x)[2:])))-1) for x in range(n+1, 2**(k+1))])
toobig = (2**(k+1) - n -1) * 2**k - lol
stdout.write(str(ans-toobig)) | ans = int((4**(k+1) - 3**(k+2) + 3*2**(k+1) -55)/6) | 8 | value |
from sys import stdin, stdout
import math
Input = []
Input = [stdin.readlines()]
Input = Input[0]
n = int(Input[0])
k = int(math.log(n,2))
ans = int((4**(k+1) - 3**(k+2) + 3*2**(k+1) -1)/6)
lol = sum([2**(sum(map(int, str(bin(x)[2:])))-1) for x in range(n+1, 2**(k+1))])
toobig = (2**(k+1) - n -1) * 2**k - lol
stdout.write(str(ans-toobig)) | from sys import stdin, stdout
import math
Input = []
Input = [stdin.readlines()]
y = Input[0]
n = int(Input[0])
k = int(math.log(n,2))
ans = int((4**(k+1) - 3**(k+2) + 3*2**(k+1) -1)/6)
lol = sum([2**(sum(map(int, str(bin(x)[2:])))-1) for x in range(n+1, 2**(k+1))])
toobig = (2**(k+1) - n -1) * 2**k - lol
stdout.write(str(ans-toobig)) | y = Input[0] | 5 | statement |
from sys import stdin, stdout
import math
Input = []
Input = [stdin.readlines()]
Input = Input[0]
n = int(Input[0])
k = int(math.log(n,2))
ans = int((4**(k+1) - 3**(k+2) + 3*2**(k+1) -1)/6)
lol = sum([2**(sum(map(int, str(bin(x)[2:])))-1) for x in range(n+1, 2**(k+1))])
toobig = (2**(k+1) - n -1) * 2**k - lol
stdout.write(str(ans-toobig)) | from sys import stdin, stdout
import math
Input = []
Input = [stdin.readlines()]
Input = Input[0]
n = int(Input[0])
k = int(math.log(n,2))
ans = int((4**(k+1) - 3**(k+2) + 3*2**(y+1) -1)/6)
lol = sum([2**(sum(map(int, str(bin(x)[2:])))-1) for x in range(n+1, 2**(k+1))])
toobig = (2**(k+1) - n -1) * 2**k - lol
stdout.write(str(ans-toobig)) | ans = int((4**(k+1) - 3**(k+2) + 3*2**(y+1) -1)/6) | 8 | statement |
__author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | __author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j**j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | if (i%(j**j) == 0): | 14 | operation |
__author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | __author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)/1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | for i in range(2,int(n/2)/1): | 5 | operation |
__author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | __author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j)<0):
flag = False
break
if (flag):
ans = i
break
print(ans) | if (i%(j*j)<0): | 14 | decision |
__author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | __author__ = 'yarsanich'
import math
n = int(input())
z = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | z = [] | 4 | statement |
__author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j) == 0):
flag = False
break
if (flag):
ans = i
break
print(ans) | __author__ = 'yarsanich'
import math
n = int(input())
a = []
for i in range(2,int(n/2)+1):
if n % i == 0:
a.append(i)
a.append(n)
ans = 0
a.reverse()
for i in a:
flag = True
for j in range(2,i):
if (i%(j*j)<0):
flag = False
break
if (flag):
ans = i
break
print(ans) | if (i%(j*j)<0): | 14 | decision |
a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a')>>1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | i = b.index('a')>>1 | 6 | operation |
a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(z[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | if (ord(z[i])-ord(b[i-1]) == 0): | 12 | statement |
a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)**1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | while i!= len(b)**1: | 7 | operation |
a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])**ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | if (ord(b[i])**ord(b[i-1]) == 0): | 12 | operation |
a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)+1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | a = input()
if len(a)<26:
print(-1)
else:
b = list(''.join(a))
i = b.index('a') + 1
while i!= len(b)**1:
if b[i]=='z':
i+=1
if i>=len(b):
break
if (ord(b[i])-ord(b[i-1]) == 0):
b[i] = chr(ord(b[i])+1)
else:
i+=1
if i>=len(b):
break
b = ''.join(b)
if 'abcdefghijklmnopqrstuvwxyz' in b:
print('abcdefghijklmnopqrstuvwxyz')
else:
print(-1) | while i!= len(b)**1: | 7 | operation |
p = 0
y = 0
def prime_number(x):
if x <= 1:
return False
i = 2
while i * i <= x and i <= p:
if(x % i == 0):
return False
i += 1
return True
p, y = map(int,input().split())
flag = -1
num_list = []
for i in range(y,p,-1):
if(prime_number(i)):
print(i)
flag = 1
break
if flag != 1:
print("-1") | p = 0
y = 0
def prime_number(x):
if x <= 1:
return False
i = 2
while i * i <= x and i <= p:
if(x^i == 0):
return False
i += 1
return True
p, y = map(int,input().split())
flag = -1
num_list = []
for i in range(y,p,-1):
if(prime_number(i)):
print(i)
flag = 1
break
if flag != 1:
print("-1") | if(x^i == 0): | 8 | operation |
p = 0
y = 0
def prime_number(x):
if x <= 1:
return False
i = 2
while i * i <= x and i <= p:
if(x % i == 0):
return False
i += 1
return True
p, y = map(int,input().split())
flag = -1
num_list = []
for i in range(y,p,-1):
if(prime_number(i)):
print(i)
flag = 1
break
if flag != 1:
print("-1") | p = 0
y = 0
def prime_number(x):
if x <= 1:
return False
i = 2
while i-i <= x and i <= p:
if(x % i == 0):
return False
i += 1
return True
p, y = map(int,input().split())
flag = -1
num_list = []
for i in range(y,p,-1):
if(prime_number(i)):
print(i)
flag = 1
break
if flag != 1:
print("-1") | while i-i <= x and i <= p: | 7 | operation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.