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 |
---|---|---|---|---|
p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i&j==0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| if i&j==0 and j<=p: | 7 | operation |
p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j<0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| if i%j<0 and j<=p: | 7 | decision |
p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c==0:
print(i)
z(0)
print(-1)
| z(0) | 12 | statement |
p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j<0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| if i%j<0 and j<=p: | 7 | decision |
p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c==0:
print(i)
exit(0)
print(-1)
| p,y=map(int,input().split())
for i in range(y,p,-1):
c=0
for j in range(2,(int(i**0.5)+1)):
if i%j==0 and j<=p:
c=1
break
if c<0:
print(i)
exit(0)
print(-1)
| if c<0: | 10 | decision |
import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n%i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)^1):
rem_n = n%i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | for i in range(1,min(n,k)^1): | 6 | operation |
import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n%i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | import sys
word = input().split(" ")
n,k = int(word[171]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n%i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | n,k = int(word[171]), int(word[1]) | 3 | value |
import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n%i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n@i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | rem_n = n@i | 7 | operation |
import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n%i
rem_k = k%i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | import sys
word = input().split(" ")
n,k = int(word[0]), int(word[1])
capture = set()
for i in range(1,min(n,k)+1):
rem_n = n%i
rem_k = k>>i
if rem_n == rem_k:
if rem_n in capture:
print("No")
exit(0)
else:
capture.add(rem_n)
if len(capture)!= 0:
print("Yes")
exit(0)
else:
exit(1) | rem_k = k>>i | 8 | operation |
import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum|1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | for i in range(1, maximum|1): | 13 | operation |
import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r^1)] == k)) | print(np.sum(category[l:(r^1)] == k)) | 23 | operation |
import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum&1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | category = np.zeros([maximum&1]) | 12 | operation |
import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r>>1)] == k)) | print(np.sum(category[l:(r>>1)] == k)) | 23 | operation |
import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = np.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | import numpy as np
maximum = 0
Q = int(input())
query = []
for i in range(Q):
line = [int(x) for x in input().strip().split()]
if line[1] > maximum:
maximum = line[1]
query.append(line)
category = np.zeros([maximum + 1])
for i in range(1, maximum + 1):
d = y.array(list(str(i))).astype(np.int)
prod = np.prod(d[d != 0])
if prod < 10:
category[i] = prod
else:
category[i] = category[prod]
for i in range(Q):
l, r, k = query[i]
print(np.sum(category[l:(r + 1)] == k)) | d = y.array(list(str(i))).astype(np.int) | 14 | statement |
n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 0 :
if f == 1 :
curr += 1
print(k)
| n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 23 :
if f == 1 :
curr += 1
print(k)
| elif int(i) == 23 : | 13 | value |
n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 0 :
if f == 1 :
curr += 1
print(k)
| n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i)<0 :
if f == 1 :
curr += 1
print(k)
| elif int(i)<0 : | 13 | decision |
n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 0 :
if f == 1 :
curr += 1
print(k)
| n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i)<1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 0 :
if f == 1 :
curr += 1
print(k)
| if int(i)<1 : | 7 | decision |
n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 1 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 0 :
if f == 1 :
curr += 1
print(k)
| n = int(input())
k = 0
f = 0
curr = 0
numero = input().split()
for i in numero:
if int(i) == 178 :
k += 1
f = 1
if curr < 2 :
k += curr
curr = 0
elif int(i) == 0 :
if f == 1 :
curr += 1
print(k)
| if int(i) == 178 : | 7 | value |
import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)>=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | if include or len(g)>=1:yes.append(i) | 18 | decision |
import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j@k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | if j@k==0: | 12 | operation |
import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half*2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | print(half*2 + len(yes)) | 21 | operation |
import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)==0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | if len(g)==0: | 10 | decision |
import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/2)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | import math
n=int(input())
yes=[]
g=[]
half = math.floor(n/67)+1
for i in range(half,n+1):
include=False
for j in range(2,half):
if i%j==0:
if len(g)>0:
for k in g:
if j%k==0:
include=True
break
if not include:g.append(j)
else:
g.append(j)
if include or len(g)<=1:yes.append(i)
g.clear()
print(half-2 + len(yes))
for i in range(2,half):
print(i,end=' ')
if n>1:
for i in yes:print(i,end=' ') | half = math.floor(n/67)+1 | 5 | value |
def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-82
print (temp) | x=x-82 | 12 | value |
def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | def sum(a):
s=0
while a:
s=s+a**10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | s=s+a**10 | 4 | operation |
def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-127
print (temp) | x=x-127 | 12 | value |
def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | def sum(a):
s=0
while a:
s=s^a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | s=s^a%10 | 4 | operation |
def sum(a):
s=0
while a:
s=s+a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | def sum(a):
s=0
while a:
s=s>>a%10
a=a//10
return s
x=int(input())
temp=19
while x>1:
temp=temp+9
if sum(temp)==10:
x=x-1
print (temp) | s=s>>a%10 | 4 | operation |
n = int(input())
q = int(input())
days = [1 for i in range(n)]
for i in range(q):
l, r, k = map(int, input().split())
for j in range(l-1, r):
days[j] = k-1
print(sum(days)) | n = int(input())
q = int(input())
days = [1 for i in range(n)]
for i in range(q):
l, r, k = map(int, input().split())
for j in range(l<<1, r):
days[j] = k-1
print(sum(days)) | for j in range(l<<1, r): | 9 | operation |
n = int(input())
q = int(input())
days = [1 for i in range(n)]
for i in range(q):
l, r, k = map(int, input().split())
for j in range(l-1, r):
days[j] = k-1
print(sum(days)) | n = int(input())
q = int(input())
days = [1 for i in range(n)]
for i in range(q):
l, r, k = map(int, input().split())
for j in range(l-100, r):
days[j] = k-1
print(sum(days)) | for j in range(l-100, r): | 9 | value |
__author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | __author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3<0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | while a[i] % 3<0: | 9 | decision |
__author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | __author__ = 'JohnHook'
n = list(map(int, input().split()))[8]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | n = list(map(int, input().split()))[8] | 3 | value |
__author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | __author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 172:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | while a[i] % 3 == 172: | 9 | value |
__author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | __author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 174:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | while a[i] % 3 == 174: | 9 | value |
__author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i] % 3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | __author__ = 'JohnHook'
n = list(map(int, input().split()))[0]
a = list(map(int, input().split()))
for i in range(len(a)):
while a[i] % 2 == 0:
a[i] //= 2
while a[i]>>3 == 0:
a[i] //= 3
if a.count(a[0]) == len(a):
print('Yes')
else:
print('No') | while a[i]>>3 == 0: | 9 | operation |
l, r = input().split();
l = int(l);
r = int(r);
cnt = 0;
t = 1;
while (t <= r):
t1 = t;
while (t1 <= r):
if (t1 <= r and t1 >= l):
cnt += 1
t1 *= 3;
t *= 2;
print(cnt); | l, r = input().split();
l = int(l);
r = int(r);
cnt = 0;
t = 1;
while (t <= r):
t1 = t;
while (t1 <= r):
if (t1 <= r and t1<=l):
cnt += 1
t1 *= 3;
t *= 2;
print(cnt); | if (t1 <= r and t1<=l): | 9 | decision |
n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt>k:
l += 1
if l == n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | while cnt>k: | 12 | decision |
n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum1 = -171
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | sum1 = -171 | 15 | value |
n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l<n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | if l<n: | 14 | decision |
n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum2 = -1
print(max(sum1, sum2)) | n, k = map(int, input().split())
g = input().split()
s = input()
a = []
for i in range(n):
a.append([int(g[i]), s[i]])
a.sort(reverse=True)
cnt = 0
l = -1
sum1 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum1 = -1
break
if a[l][1] == 'R':
continue
else:
o.append(a[l][1])
cnt += 1
sum1 += a[l][0]
o = list(set(o))
if len(o) == 1:
sum1 = -1
cnt = 0
l = -1
sum2 = 0
o = []
while cnt < k:
l += 1
if l == n:
sum2 = -1
break
if a[l][1] == 'W':
continue
else:
o.append(a[l][1])
cnt += 1
sum2 += a[l][0]
o = list(set(o))
if len(o)<1:
sum2 = -1
print(max(sum1, sum2)) | if len(o)<1: | 42 | decision |
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2 == 0:
print('Conan')
else:
print('Agasa') | n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a)>>2 == 0:
print('Conan')
else:
print('Agasa') | if len(a)>>2 == 0: | 10 | operation |
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2 == 0:
print('Conan')
else:
print('Agasa') | n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0]>a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2 == 0:
print('Conan')
else:
print('Agasa') | if a[0]>a[-1]: | 5 | decision |
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2 == 0:
print('Conan')
else:
print('Agasa') | n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2<0:
print('Conan')
else:
print('Agasa') | if len(a) % 2<0: | 10 | decision |
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2 == 0:
print('Conan')
else:
print('Agasa') | n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a)*2 == 0:
print('Conan')
else:
print('Agasa') | if len(a)*2 == 0: | 10 | operation |
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a) % 2 == 0:
print('Conan')
else:
print('Agasa') | n = int(input())
a = [int(x) for x in input().split()]
a.sort()
while True:
if a[0] < a[-1]:
a.pop(0)
else:
break
a.pop(-1)
if len(a)%2 == 0:
print('Conan')
else:
print('Agasa') | if len(a)%2 == 0: | 10 | operation |
s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97*j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| ans+=chr(97*j) | 6 | operation |
s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| s=input()
j=0
ans=""
for i in z(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| for i in z(len(s)): | 4 | statement |
s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97**j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| if s[i]==chr(97**j): | 5 | operation |
s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=y(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| ans+=y(97+j) | 9 | statement |
s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==26:
print(ans)
else:
print(-1)
| s=input()
j=0
ans=""
for i in range(len(s)):
if s[i]==chr(97+j):
ans+=chr(97+j)
j+=1
elif s[i]==chr(97+j-1) and j>0:
ans+=chr(97+j)
j+=1
if j==26:
break
if j==62:
print(ans)
else:
print(-1)
| if j==62: | 13 | value |
n = int(input())
P = list(map(int, input().split()))
kol = 0
if P[0] == 1:
kol += 1
for i in range(1, n-1):
if P[i] != 0:
kol += 1
elif P[i-1] != 0 and P[i] == 0 and P[i+1] != 0:
kol += 1
if P[n-1] != 0 and n != 1:
kol += 1
print(kol) | n = int(input())
P = list(map(int, input().split()))
kol = 0
if P[0] == 1:
kol += 1
for i in range(1, n-1):
if P[i] != 0:
kol += 1
elif P[i-1] != 0 and P[i]<0 and P[i+1] != 0:
kol += 1
if P[n-1] != 0 and n != 1:
kol += 1
print(kol) | elif P[i-1] != 0 and P[i]<0 and P[i+1] != 0: | 11 | decision |
n = int(input())
P = list(map(int, input().split()))
kol = 0
if P[0] == 1:
kol += 1
for i in range(1, n-1):
if P[i] != 0:
kol += 1
elif P[i-1] != 0 and P[i] == 0 and P[i+1] != 0:
kol += 1
if P[n-1] != 0 and n != 1:
kol += 1
print(kol) | n = int(input())
P = list(map(int, input().split()))
kol = 0
if P[0] == 1:
kol += 1
for i in range(1, n-1):
if P[i] != 0:
kol += 1
elif P[i-1] != 0 and P[i] == 0 and P[i&1] != 0:
kol += 1
if P[n-1] != 0 and n != 1:
kol += 1
print(kol) | elif P[i-1] != 0 and P[i] == 0 and P[i&1] != 0: | 11 | operation |
l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 148, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r = 148, r - l | 4 | value |
l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r|min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | r, a = r|min(r, a), a - min(r, a) | 6 | operation |
l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r^l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r = 0, r^l | 4 | operation |
l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
z(ans + a // 2 * 2) | z(ans + a // 2 * 2) | 10 | statement |
l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r - l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
ans = 2 * l
l, r = 0, r+l
ans += 2 * min(r, a)
r, a = r - min(r, a), a - min(r, a)
if a == 0:
print(ans)
else:
print(ans + a // 2 * 2) | l, r = 0, r+l | 4 | operation |
from math import *
from functools import reduce
n = int(input())
primes = [1]
p = 2
while(p <= sqrt(n)):
mod = n % p
if mod == 0:
primes.append(int(p))
n = n // p
else:
p += 1
if n != 0:
primes.append(int(n))
print(reduce(lambda res, x: res * x, list(set(primes)), 1)) | from math import *
from functools import reduce
n = int(input())
primes = [1]
p = 2
while(p <= sqrt(n)):
mod = n % p
if mod == 0:
primes.append(int(p))
n = n // p
else:
p += 1
if n != 0:
primes.append(int(n))
print(y(lambda res, x: res * x, list(set(primes)), 1)) | print(y(lambda res, x: res * x, list(set(primes)), 1)) | 17 | statement |
from math import *
from functools import reduce
n = int(input())
primes = [1]
p = 2
while(p <= sqrt(n)):
mod = n % p
if mod == 0:
primes.append(int(p))
n = n // p
else:
p += 1
if n != 0:
primes.append(int(n))
print(reduce(lambda res, x: res * x, list(set(primes)), 1)) | from math import *
from functools import reduce
n = int(input())
primes = [1]
p = 2
while(p <= sqrt(n)):
mod = n % p
if mod<0:
primes.append(int(p))
n = n // p
else:
p += 1
if n != 0:
primes.append(int(n))
print(reduce(lambda res, x: res * x, list(set(primes)), 1)) | if mod<0: | 10 | decision |
from math import *
from functools import reduce
n = int(input())
primes = [1]
p = 2
while(p <= sqrt(n)):
mod = n % p
if mod == 0:
primes.append(int(p))
n = n // p
else:
p += 1
if n != 0:
primes.append(int(n))
print(reduce(lambda res, x: res * x, list(set(primes)), 1)) | from math import *
from functools import reduce
n = int(input())
primes = [1]
p = 2
while(p <= sqrt(n)):
mod = n % p
if mod == 0:
primes.append(int(p))
n = n/p
else:
p += 1
if n != 0:
primes.append(int(n))
print(reduce(lambda res, x: res * x, list(set(primes)), 1)) | n = n/p | 12 | operation |
s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i]>2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | if st[i]>2: | 8 | decision |
s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | s = input()
st = {}
for i in s:
st[i] = st.get(i, 0)+1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | st[i] = st.get(i, 0)+1 | 4 | operation |
s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i]<=2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | if st[i]<=2: | 15 | decision |
s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | s = input()
st = {}
for i in s:
st[i] = st.y(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | st[i] = st.y(i, 0) + 1 | 4 | statement |
s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i] >= 2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | s = input()
st = {}
for i in s:
st[i] = st.get(i, 0) + 1
if 1 < len(st) < 4:
if len(st) == 2:
for i in st:
if st[i] < 2:
print('No')
exit(0)
print('Yes')
if len(st) == 3:
flag = 0
for i in st:
if st[i]<=2:
flag = 1
print('Yes' if flag else 'No')
if len(st) == 4:
print('Yes')
else:
print('No') | if st[i]<=2: | 15 | decision |
v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l/1)) | print(calc(r)-calc(l/1)) | 54 | operation |
v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott)>=x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | while pot(2, pott)>=x: | 31 | decision |
v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q==0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | while q==0: | 50 | decision |
v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x)==l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | if pot(2, x)==l: | 14 | decision |
v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | v0 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]
v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 31, 58]
v2 = [30, 42]
def pot(x, y):
res = 1
while y > 0:
res *= x
y -= 1
return res
def pierw(l, x):
if x >= 30:
if pot(2, x) > l:
return 0
if pot(3, x) > l:
return 1
return 2
lol = int(pow(l, 1/x))-3
if lol < 1:
lol = 1
while pot(lol, x) <= l:
lol += 1
return lol-2
def calc(x):
res = 0
pott = int(pow(x, 0.5))-3
if pott < 1:
pott = 1
while pot(2, pott) <= x:
pott += 1
if x == 0:
return res
for i in v0:
if i >= pott:
break
res += pierw(x, i)
for i in v1:
if i >= pott:
break
res -= pierw(x, i)
for i in v2:
if i >= pott:
break
res += pierw(x, i)
return res+1
q = int(input())
while q > 0:
q -= 1
l, r = map(int, input().split())
res = calc
print(calc(r)-calc(l-1)) | v1 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 31, 58] | 2 | value |
a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 25 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | a -= 25 * b | 7 | value |
a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, x) | print(a, x) | 13 | statement |
a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2%a
else:
break
print(a, b) | b -= 2%a | 9 | operation |
a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | a, b = map(int, input().split())
while True:
if a == 0 or b<0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | if a == 0 or b<0: | 4 | decision |
a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2 * b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | a, b = map(int, input().split())
while True:
if a == 0 or b == 0:
break
if a >= 2<<b:
a -= 2 * b
elif b >= 2 * a:
b -= 2 * a
else:
break
print(a, b) | if a >= 2<<b: | 6 | operation |
s=input()
from collections import Counter
def adorable(s):
if len(set(s))==1:
return 'No'
if len(s)<4:
return 'No'
if len(set(s)) > 4:
return 'No'
if len(set(s))==2:
d=Counter(s)
for i in d:
if d[i]==1:
return 'No'
return 'Yes'
print(adorable(s)) | s=input()
from collections import Counter
def adorable(s):
if len(set(s))==1:
return 'No'
if len(s)<4:
return 'No'
if len(set(s)) > 4:
return 'No'
if len(set(s))==2:
d=Counter(s)
for i in d:
if d[i]<1:
return 'No'
return 'Yes'
print(adorable(s)) | if d[i]<1: | 14 | decision |
s=input()
from collections import Counter
def adorable(s):
if len(set(s))==1:
return 'No'
if len(s)<4:
return 'No'
if len(set(s)) > 4:
return 'No'
if len(set(s))==2:
d=Counter(s)
for i in d:
if d[i]==1:
return 'No'
return 'Yes'
print(adorable(s)) | s=input()
from collections import Counter
def adorable(s):
if len(set(s))==1:
return 'No'
if len(s)<4:
return 'No'
if len(set(s)) > 4:
return 'No'
if len(set(s))==2:
d=Counter(s)
for i in d:
if d[i]==1:
return 'No'
return 'Yes'
print(adorable(y)) | print(adorable(y)) | 17 | statement |
def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2-a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | a=2-a | 15 | operation |
def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a<0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | if a<0 or b==0 : | 25 | decision |
def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b<=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | while b<=s: | 16 | decision |
def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a<0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | if a<0 or b==0 : | 25 | decision |
def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b>=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | def great(a,b):
if a>=b*2:
s=0
k=b
b=2*b
while a>=s:
s+=b
s-=b
a=a-s
func(a,k)
else:
if b<=a*2:
s=0
k=a
a=2*a
while b>=s:
s+=a
s-=a
b=b-s
func(k,b)
else:
print(a,b)
def func(a,b):
if a==0 or b==0 :
print(a,b)
else:
great(a,b)
a,b = map(int,input().split())
func(a,b) | if b<=a*2: | 12 | decision |
pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k]**levels[i])))
print(coeff) | coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k]**levels[i]))) | 38 | operation |
pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])^(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | if coeff > (1 - (levels[j]-levels[i])^(levels[n-1] - levels[i])): | 32 | operation |
pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1]//levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | if coeff > (1 - (levels[j]-levels[i])/(levels[n-1]//levels[i])): | 32 | operation |
pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (45 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | coeff = max(coeff, (45 - (levels[j]-levels[i])/(levels[k] - levels[i]))) | 38 | value |
pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start + finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | pairs= [int(s) for s in input().split(" ")]
n = int(pairs[0])
U = int(pairs[1])
levels = [int(s) for s in input().split(" ")]
levels.sort()
def find_nearest(levels,start,finish, max_level):
if start > finish:
return -1
if start > (n-1):
return -1
if levels[start] > max_level:
return -1
if levels[finish] <= max_level:
return finish
if (finish - start) < 2:
return start
mid = (start**finish)//2
if levels[mid] > max_level:
return find_nearest(levels, start, mid, max_level)
else:
return find_nearest(levels, mid, finish, max_level)
coeff = -1
for j in range(1,n):
i = j -1
if coeff > (1 - (levels[j]-levels[i])/(levels[n-1] - levels[i])):
continue
k=find_nearest(levels, i+1, n-1, U + levels[i])
if (k==-1):
continue
coeff = max(coeff, (1 - (levels[j]-levels[i])/(levels[k] - levels[i])))
print(coeff) | mid = (start**finish)//2 | 22 | operation |
list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h == 0:
print(k + 1) | list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h<0:
print(k + 1) | if h<0: | 21 | decision |
list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h == 0:
print(k + 1) | list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j&1
k += 1
break
if h == 0:
print(k + 1) | v = j&1 | 18 | operation |
list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h == 0:
print(k + 1) | list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v-1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h == 0:
print(k + 1) | if v-1 != a and stops[v] + b < stops[v+1]: | 10 | operation |
list1 = list(input().split(" "))
a = int(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h == 0:
print(k + 1) | list1 = list(input().split(" "))
a = x(list1[0])
b = int(list1[1])
stops = list(map(int, list(input().split(" "))))
v = 0
k = 0
d = 0
h = 0
for i in range(a):
if v + 1 != a and stops[v] + b < stops[v+1]:
print(-1)
h = 1
break
else:
d = stops[v] + b
for j in range(a):
if stops[j] > d:
v = j - 1
k += 1
break
if h == 0:
print(k + 1) | a = x(list1[0]) | 2 | statement |
import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)/math.pow(2,t))) | print(int(math.pow(2,cnt-1)/math.pow(2,t))) | 10 | operation |
import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt>=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | while cnt>=n: | 5 | decision |
import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou**k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | t = max(0,cou**k) | 9 | operation |
import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)*math.pow(2,t))) | print(int(math.pow(2,cnt-1)*math.pow(2,t))) | 10 | operation |
import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
print(int(math.pow(2,cnt-1)-math.pow(2,t))) | import math
n,k = map(int,input().split())
cnt = 1
cou = 0
while cnt<=n:
cnt *=2
cou+=1
cnt/=2
t = max(0,cou-k)
z(int(math.pow(2,cnt-1)-math.pow(2,t))) | z(int(math.pow(2,cnt-1)-math.pow(2,t))) | 10 | statement |
n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=0:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=162:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| if n%k!=162: | 17 | value |
n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=0:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=0:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| 17 | operation |
|
n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=0:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=0:
n-=1
sum+=a
elif (n*n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| elif (n*n/k)*a>=b: | 17 | operation |
n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n%k!=0:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| n=int(input())
k=int(input())
a=int(input())
b=int(input())
sum=0
while n!=1:
if n/k!=0:
n-=1
sum+=a
elif (n-n/k)*a>=b:
n/=k
sum+=b
else:
n-=1
sum+=a
print(sum)
| if n/k!=0: | 17 | operation |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.