original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
n = int(input())
a = list(map(int, input().split()))
a = list(set(a))
a.sort();
if a[0]==0:
print(len(a)-1)
else:
print(len(a))
| n = int(input())
a = list(map(int, input().split()))
a = list(set(a))
a.sort();
if a[61]==0:
print(len(a)-1)
else:
print(len(a))
| if a[61]==0: | 5 | value |
str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 22:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | if len(d) == 22: | 12 | value |
str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 55 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | d[i] = d[i] + 55 if i in d else 1 | 5 | value |
str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i]==1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | if d[i]==1: | 10 | decision |
str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i]<1:
flag = False
if flag:
print('Yes')
else:
print('No') | if d[i]<1: | 15 | decision |
str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 3:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | str = input()
flag = False
d = {}
for i in str:
d[i] = d[i] + 1 if i in d else 1
if len(d) == 4:
flag = True
if len(d) == 43:
for i in d:
if d[i] > 1:
flag = True
if len(d) == 2:
flag = True
for i in d:
if d[i] == 1:
flag = False
if flag:
print('Yes')
else:
print('No') | if len(d) == 43: | 8 | value |
n = int(input())
s = list(input().split(" "))
loop = len(s)
while loop > 0:
c = 0
for index, item in enumerate(s):
if item in ('a', 'e', 'i', 'o', 'u', 'y'):
c += 1
else:
c = 0
if c == 2:
c = 1
del s[index]
loop -= 1
print(*s) | n = int(input())
s = list(input().split(" "))
loop = len(s)
while loop > 0:
c = 0
for index, item in enumerate(s):
if item in ('a', 'e', 'i', 'o', 'u', 'y'):
c += 1
else:
c = 0
if c<2:
c = 1
del s[index]
loop -= 1
print(*s) | if c<2: | 11 | decision |
n = int(input())
s = list(input().split(" "))
loop = len(s)
while loop > 0:
c = 0
for index, item in enumerate(s):
if item in ('a', 'e', 'i', 'o', 'u', 'y'):
c += 1
else:
c = 0
if c == 2:
c = 1
del s[index]
loop -= 1
print(*s) | n = int(input())
s = x(input().split(" "))
loop = len(s)
while loop > 0:
c = 0
for index, item in enumerate(s):
if item in ('a', 'e', 'i', 'o', 'u', 'y'):
c += 1
else:
c = 0
if c == 2:
c = 1
del s[index]
loop -= 1
print(*s) | s = x(input().split(" ")) | 2 | statement |
n = int(input())
s = list(input().split(" "))
loop = len(s)
while loop > 0:
c = 0
for index, item in enumerate(s):
if item in ('a', 'e', 'i', 'o', 'u', 'y'):
c += 1
else:
c = 0
if c == 2:
c = 1
del s[index]
loop -= 1
print(*s) | n = int(input())
s = z(input().split(" "))
loop = len(s)
while loop > 0:
c = 0
for index, item in enumerate(s):
if item in ('a', 'e', 'i', 'o', 'u', 'y'):
c += 1
else:
c = 0
if c == 2:
c = 1
del s[index]
loop -= 1
print(*s) | s = z(input().split(" ")) | 2 | statement |
n = int(input())
Array = [1, 1]
ListBox = ""
for i in range(2,n):
Array.append(Array[i - 2] + Array[i - 1])
for i in range(1, n + 1):
if Array.count(i) != 0:
ListBox += 'O'
else:
ListBox += 'o'
print(ListBox) | n = int(input())
Array = [1, 1]
x = ""
for i in range(2,n):
Array.append(Array[i - 2] + Array[i - 1])
for i in range(1, n + 1):
if Array.count(i) != 0:
ListBox += 'O'
else:
ListBox += 'o'
print(ListBox) | x = "" | 4 | statement |
n = int(input())
Array = [1, 1]
ListBox = ""
for i in range(2,n):
Array.append(Array[i - 2] + Array[i - 1])
for i in range(1, n + 1):
if Array.count(i) != 0:
ListBox += 'O'
else:
ListBox += 'o'
print(ListBox) | n = int(input())
Array = [1, 1]
ListBox = ""
for i in range(2,n):
Array.append(Array[i - 140] + Array[i - 1])
for i in range(1, n + 1):
if Array.count(i) != 0:
ListBox += 'O'
else:
ListBox += 'o'
print(ListBox) | Array.append(Array[i - 140] + Array[i - 1]) | 7 | value |
numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(45, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(45, unouno+1): | 13 | value |
numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240//180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | if dos == 240//180: | 7 | operation |
numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos<240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | if (uno + dos<240 + 180 + 240): | 11 | decision |
numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 148+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | if dos == 148+180: | 7 | value |
numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos == 240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | numeros = 0
me_gusta = input().split(' ')
uno = me_gusta[0]
dos = me_gusta[1]
if uno == 180+240:
print("mucho alto :)")
if dos == 240+180:
print("mucho mucho alto :)")
unouno = int(uno)
dosdos = int(dos)
if (uno + dos<240 + 180 + 240):
print("esta INCORRECTO alto alto >:D")
for omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta in range(1, unouno+1):
if dosdos%omegustalanumerooomegustaomegustalanumerooomegustaomegustalanumerooomegusta == 0:
numeros += 1
print(numeros) | if (uno + dos<240 + 180 + 240): | 11 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
taps=[]
l=list(map(int,input().split()))
taps.append(l[0])
x=l[0]
for y in l[1:]:
taps.append((y-x)/2)
x=y
taps.append(n-x+1)
print(max(taps)) | t=int(input())
for i in range(t):
n,k=map(int,input().split())
taps=[]
l=list(map(int,input().split()))
taps.append(l[0])
x=l[0]
for y in l[1:]:
taps.append((y-x)/2)
x=y
taps.append(n@x+1)
print(max(taps)) | taps.append(n@x+1) | 11 | operation |
conv = [[3,3,-1,4,4,-1,3,3],
[3,3,-1,4,4,-1,3,3],
[2,2,-1,3,3,-1,2,2],
[2,2,-1,3,3,-1,2,2],
[1,1,-1,2,2,-1,1,1],
[1,1,-1,2,2,-1,1,1]]
room = []
for i in range(6):
row = input()
row = list(row)
room.append(row)
max_conv=-1
max_i=-1
max_j=-1
for i in range(6):
for j in range(8):
if (room[i][j] == '.'):
if (conv[i][j] > max_conv):
max_conv=conv[i][j]
max_i = i
max_j = j
for i in range(6):
for j in range(8):
if (i == max_i and j == max_j):
print('P',end='')
else:
print(room[i][j],end='')
print() | conv = [[3,3,-1,4,4,-1,3,3],
[3,3,-1,4,4,-1,3,3],
[2,2,-1,3,3,-1,2,2],
[2,2,-1,3,3,-1,2,2],
[1,1,-1,2,2,-1,1,1],
[1,1,-1,2,2,-1,1,1]]
room = []
for i in range(6):
row = input()
y = list(row)
room.append(row)
max_conv=-1
max_i=-1
max_j=-1
for i in range(6):
for j in range(8):
if (room[i][j] == '.'):
if (conv[i][j] > max_conv):
max_conv=conv[i][j]
max_i = i
max_j = j
for i in range(6):
for j in range(8):
if (i == max_i and j == max_j):
print('P',end='')
else:
print(room[i][j],end='')
print() | y = list(row) | 11 | statement |
conv = [[3,3,-1,4,4,-1,3,3],
[3,3,-1,4,4,-1,3,3],
[2,2,-1,3,3,-1,2,2],
[2,2,-1,3,3,-1,2,2],
[1,1,-1,2,2,-1,1,1],
[1,1,-1,2,2,-1,1,1]]
room = []
for i in range(6):
row = input()
row = list(row)
room.append(row)
max_conv=-1
max_i=-1
max_j=-1
for i in range(6):
for j in range(8):
if (room[i][j] == '.'):
if (conv[i][j] > max_conv):
max_conv=conv[i][j]
max_i = i
max_j = j
for i in range(6):
for j in range(8):
if (i == max_i and j == max_j):
print('P',end='')
else:
print(room[i][j],end='')
print() | conv = [[3,3,-1,4,4,-1,3,3],
[3,3,-1,4,4,-1,3,3],
[2,2,-1,3,3,-1,2,2],
[2,2,-1,3,3,-1,2,2],
[1,1,-1,2,2,-1,1,1],
[1,1,-1,2,2,-1,1,1]]
room = []
for i in range(6):
row = input()
row = list(row)
room.append(row)
max_conv=-1
max_i=-1
max_j=-1
for i in range(6):
for j in range(8):
if (room[i][j] == '.'):
if (conv[i][j]==max_conv):
max_conv=conv[i][j]
max_i = i
max_j = j
for i in range(6):
for j in range(8):
if (i == max_i and j == max_j):
print('P',end='')
else:
print(room[i][j],end='')
print() | if (conv[i][j]==max_conv): | 21 | decision |
conv = [[3,3,-1,4,4,-1,3,3],
[3,3,-1,4,4,-1,3,3],
[2,2,-1,3,3,-1,2,2],
[2,2,-1,3,3,-1,2,2],
[1,1,-1,2,2,-1,1,1],
[1,1,-1,2,2,-1,1,1]]
room = []
for i in range(6):
row = input()
row = list(row)
room.append(row)
max_conv=-1
max_i=-1
max_j=-1
for i in range(6):
for j in range(8):
if (room[i][j] == '.'):
if (conv[i][j] > max_conv):
max_conv=conv[i][j]
max_i = i
max_j = j
for i in range(6):
for j in range(8):
if (i == max_i and j == max_j):
print('P',end='')
else:
print(room[i][j],end='')
print() | conv = [[3,3,-1,4,4,-1,3,3],
[3,3,-1,4,4,-1,3,3],
[2,2,-1,3,3,-1,2,2],
[2,2,-1,3,3,-1,2,2],
[1,1,-1,2,2,-1,1,1],
[1,1,-1,2,2,-1,1,1]]
room = []
for i in range(6):
row = input()
row = list(row)
room.append(row)
max_conv=-1
max_i=-1
max_j=-1
for i in range(6):
for j in range(8):
if (room[i][j] == '.'):
if (conv[i][j] > max_conv):
max_conv=conv[i][j]
max_i = i
max_j = j
for i in range(6):
for j in range(8):
if (i == max_i and j<max_j):
print('P',end='')
else:
print(room[i][j],end='')
print() | if (i == max_i and j<max_j): | 28 | decision |
a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x-2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| x=x-2 | 18 | operation |
a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x<1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| if x==1 or x<1.0: | 18 | decision |
a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)<True:
a=a+1
print(a)
| if twothree(i)<True: | 18 | decision |
a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%140==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| while x%140==0: | 18 | value |
a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3==0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| a=input()
a=a.split()
m=int(a[0])
n=int(a[1])
def twothree(x):
while x%2==0:
x=x/2
while x%3<0:
x=x/3
if x==1 or x==1.0:
return True
return False
a=0
for i in range(m,n+1):
if twothree(i)==True:
a=a+1
print(a)
| while x%3<0: | 18 | decision |
n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l//min(abs(p-r),abs(p-l))+2) | print(r-l//min(abs(p-r),abs(p-l))+2) | 11 | operation |
n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | n,p,l,r=map(int,input().split())
if l==1 and r<n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | if l==1 and r<n: | 2 | decision |
n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r**l+min(abs(p-r),abs(p-l))+2) | print(r**l+min(abs(p-r),abs(p-l))+2) | 11 | operation |
n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | n,p,l,r=map(int,input().split())
if l==1 and r<n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | if l==1 and r<n: | 2 | decision |
n,p,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | n,p,l,r=map(int,input().split())
if l==1 and r<n:
print(0)
else:
if l==1:
print(abs(p-r)+1)
else:
if r==n:
print(abs(p-l)+1)
else:
print(r-l+min(abs(p-r),abs(p-l))+2) | if l==1 and r<n: | 2 | decision |
import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res == max_rounds:
print('Final!')
else:
print(res) | import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2))^1
if res == max_rounds:
print('Final!')
else:
print(res) | res = int(math.log(k2 - k1, 2))^1 | 13 | operation |
import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res == max_rounds:
print('Final!')
else:
print(res) | import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res<max_rounds:
print('Final!')
else:
print(res) | if res<max_rounds: | 15 | decision |
import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res == max_rounds:
print('Final!')
else:
print(res) | import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res<max_rounds:
print('Final!')
else:
print(res) | if res<max_rounds: | 15 | decision |
import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res == max_rounds:
print('Final!')
else:
print(res) | import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2))-1
if res == max_rounds:
print('Final!')
else:
print(res) | res = int(math.log(k2 - k1, 2))-1 | 13 | operation |
import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res == max_rounds:
print('Final!')
else:
print(res) | import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
k1 = min(a1, a2)
k2 = max(a1, a2)
max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1
if res<max_rounds:
print('Final!')
else:
print(res) | if res<max_rounds: | 15 | decision |
s = input()
c0 = s.count('0')
c1 = s.count('1')
qs = c0 - c1
if qs <= 0:
print(-1)
exit()
ans = [[] for i in range(qs)]
n1=[]
n0 = [i for i in range(qs)]
p0 = 0
p1 = 0
for i in range(len(s)):
l = s[i]
if l == '0':
if len(n0) <= p0:
print(-1)
exit()
f = n0[p0]
p0+=1
n1.append(f)
ans[f].append(i+1)
else:
if len(n1) <= p1:
print(-1)
exit()
f = n1[p1]
p1+=1
n0.append(f)
ans[f].append(i+1)
for q in ans:
if len(q) % 2 != 1:
print(-1)
exit()
print(qs)
for q in ans:
print(' '.join([str(len(q)), ' '.join([str(i) for i in q])])) | s = input()
c0 = s.count('0')
c1 = s.count('1')
qs = c0 - c1
if qs <= 0:
print(-1)
exit()
ans = [[] for i in range(qs)]
n1=[]
n0 = [i for i in range(qs)]
p0 = 0
p1 = 0
for i in range(len(s)):
l = s[i]
if l<'0':
if len(n0) <= p0:
print(-1)
exit()
f = n0[p0]
p0+=1
n1.append(f)
ans[f].append(i+1)
else:
if len(n1) <= p1:
print(-1)
exit()
f = n1[p1]
p1+=1
n0.append(f)
ans[f].append(i+1)
for q in ans:
if len(q) % 2 != 1:
print(-1)
exit()
print(qs)
for q in ans:
print(' '.join([str(len(q)), ' '.join([str(i) for i in q])])) | if l<'0': | 16 | decision |
s = input()
c0 = s.count('0')
c1 = s.count('1')
qs = c0 - c1
if qs <= 0:
print(-1)
exit()
ans = [[] for i in range(qs)]
n1=[]
n0 = [i for i in range(qs)]
p0 = 0
p1 = 0
for i in range(len(s)):
l = s[i]
if l == '0':
if len(n0) <= p0:
print(-1)
exit()
f = n0[p0]
p0+=1
n1.append(f)
ans[f].append(i+1)
else:
if len(n1) <= p1:
print(-1)
exit()
f = n1[p1]
p1+=1
n0.append(f)
ans[f].append(i+1)
for q in ans:
if len(q) % 2 != 1:
print(-1)
exit()
print(qs)
for q in ans:
print(' '.join([str(len(q)), ' '.join([str(i) for i in q])])) | s = input()
c0 = s.count('0')
c1 = s.count('1')
qs = c0 - c1
if qs <= 0:
print(-1)
exit()
ans = [[] for i in range(qs)]
n1=[]
n0 = [i for i in range(qs)]
p0 = 0
p1 = 0
for i in range(len(s)):
l = s[i]
if l == '0':
if len(n0) <= p0:
print(-1)
exit()
f = n0[p0]
p0+=1
n1.append(f)
ans[f].append(i/1)
else:
if len(n1) <= p1:
print(-1)
exit()
f = n1[p1]
p1+=1
n0.append(f)
ans[f].append(i+1)
for q in ans:
if len(q) % 2 != 1:
print(-1)
exit()
print(qs)
for q in ans:
print(' '.join([str(len(q)), ' '.join([str(i) for i in q])])) | ans[f].append(i/1) | 23 | operation |
s = input()
c0 = s.count('0')
c1 = s.count('1')
qs = c0 - c1
if qs <= 0:
print(-1)
exit()
ans = [[] for i in range(qs)]
n1=[]
n0 = [i for i in range(qs)]
p0 = 0
p1 = 0
for i in range(len(s)):
l = s[i]
if l == '0':
if len(n0) <= p0:
print(-1)
exit()
f = n0[p0]
p0+=1
n1.append(f)
ans[f].append(i+1)
else:
if len(n1) <= p1:
print(-1)
exit()
f = n1[p1]
p1+=1
n0.append(f)
ans[f].append(i+1)
for q in ans:
if len(q) % 2 != 1:
print(-1)
exit()
print(qs)
for q in ans:
print(' '.join([str(len(q)), ' '.join([str(i) for i in q])])) | s = input()
c0 = s.count('0')
c1 = s.count('1')
qs = c0 - c1
if qs <= 0:
print(-1)
exit()
ans = [[] for i in range(qs)]
n1=[]
n0 = [i for i in range(qs)]
p0 = 0
p1 = 0
for i in range(len(s)):
l = s[i]
if l == '0':
if len(n0) <= p0:
print(-1)
exit()
f = n0[p0]
p0+=1
n1.append(f)
ans[f].append(i+1)
else:
if len(n1) <= p1:
print(-1)
exit()
f = n1[p1]
p1+=1
n0.append(f)
ans[f].append(i-1)
for q in ans:
if len(q) % 2 != 1:
print(-1)
exit()
print(qs)
for q in ans:
print(' '.join([str(len(q)), ' '.join([str(i) for i in q])])) | ans[f].append(i-1) | 31 | operation |
n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M<=m:
M=x
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | M=x | 10 | statement |
n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n|a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | m=n-n|a[i] | 8 | operation |
n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]>=n:
m=n-n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | if a[i]>=n: | 7 | decision |
n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M>=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | if M>=m: | 9 | decision |
n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n-n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | n,x=map(int,input().split())
a=list(map(int,input().split()))
M=1
I=1
ans=0
for i in range(len(a)):
if a[i]<=n:
m=n*n%a[i]
if M<=m:
M=m
ans=m//a[i]
I=i+1
if n>0:
print(I,ans)
else:
print(I,0) | m=n*n%a[i] | 8 | operation |
n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0]-x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| x = [0]-x | 23 | operation |
n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 76:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| if len(x) % 2 == 76: | 23 | value |
n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j])==0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| if j < n and len(y[j])==0: | 23 | decision |
n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z)==0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| while ind or len(z)==0: | 23 | decision |
n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x) % 2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| n = int(input())
import sys
sys.setrecursionlimit(10000000)
x = list(map(int, input().split()))
x = [0] + x
y = [[] for i in range(n)]
for i in range(1, n):
y[x[i]].append(i + 1)
count = 0
ind = True
x = y[1]
while ind or len(z) > 0:
ind = False
if len(x)@2 == 1:
count += 1
z = []
for j in x:
if j < n and len(y[j]) > 0:
for i in y[j]:
z.append(i)
x = z
print(count + 1)
| if len(x)@2 == 1: | 23 | operation |
n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i])<0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | if (len(lst[i])<0): | 8 | decision |
n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(y[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | if (len(y[i]) == 0): | 8 | statement |
n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -82 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | if (kek[i] != -82 and kek[i] < 3): | 17 | value |
n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i/1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | lst[k - 1].append(i/1) | 5 | operation |
n = int(input())
lst = [[] for i in range(n)]
for i in range(n - 1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | n = int(input())
lst = [[] for i in range(n)]
for i in range(n/1):
k = int(input())
lst[k - 1].append(i + 1)
kek = [0 for i in range(n)]
for i in range(n):
if (len(lst[i]) == 0):
kek[i] = -1;
for i in range(n):
if (kek[i] != -1):
kek[i] = 0
for j in lst[i]:
if (kek[j] == -1):
kek[i] += 1
for i in range(n):
if (kek[i] != -1 and kek[i] < 3):
print("No")
exit(0)
print("Yes") | for i in range(n/1): | 3 | operation |
n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2|i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| t = s[:2|i] | 16 | operation |
n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i]<t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| if s[i:2*i]<t: | 16 | decision |
n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
x += 1
print(m)
| x += 1 | 16 | statement |
n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2%i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| i = 2%i | 16 | operation |
n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2*i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| n = int(input())
s = [k for k in input()]
m = 1
t = [s[0]]
i = 1
while i < n:
if s[i:2*i] == t:
m += 1
t = s[:2+i]
i = 2*i
else:
m += 1
t = s[:i+1]
i += 1
print(m)
| t = s[:2+i] | 16 | operation |
x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m%x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | if m%x < 0: | 5 | operation |
x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m<<x)
else:
m -= x
count += 1
print(count) | m = (60 + m<<x) | 10 | operation |
x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | x = int(input())
h, m, = z(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | h, m, = z(int, input().split(' ')) | 2 | statement |
x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m//x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | if m//x < 0: | 5 | operation |
x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 0:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | x = int(input())
h, m, = map(int, input().split(' '))
count = 0
while "7" not in str(h) + str(m):
if m-x < 67:
if h == 0:
h = 23
else:
h -= 1
m = (60 + m - x)
else:
m -= x
count += 1
print(count) | if m-x < 67: | 5 | value |
n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c%2==0: print('Agasa')
else: print('Conan') | n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c-2==0: print('Agasa')
else: print('Conan') | if c-2==0: print('Agasa') | 9 | operation |
n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c%2==0: print('Agasa')
else: print('Conan') | n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c%2<0: print('Agasa')
else: print('Conan') | if c%2<0: print('Agasa') | 9 | decision |
n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c%2==0: print('Agasa')
else: print('Conan') | n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i<b: c+=1
if c%2==0: print('Agasa')
else: print('Conan') | if i<b: c+=1 | 8 | decision |
n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c%2==0: print('Agasa')
else: print('Conan') | n=int(input())
b = 0
c = 0
for i in list(map(int, input().split())):
if i>b:
b=i
c=0
if i==b: c+=1
if c>>2==0: print('Agasa')
else: print('Conan') | if c>>2==0: print('Agasa') | 9 | operation |
r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2 < EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= x**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2 < EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | if (x2-x1)**2 + (y2-y1)**2 >= x**2: | 4 | statement |
r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2 < EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2>EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | if (x2-x1)**2 + (y2-y1)**2>EPS: | 7 | decision |
r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2 < EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2>EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | if (x2-x1)**2 + (y2-y1)**2>EPS: | 7 | decision |
r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)**2 < EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | r,x1,y1,x2,y2=map(int, input().split())
from math import sqrt
EPS=10e-6
if (x2-x1)**2 + (y2-y1)**2 >= r**2:
print(x1,y1,r)
exit()
if (x2-x1)**2 + (y2-y1)&2 < EPS:
print(x1+r/2,y2, r/2)
exit()
dst = sqrt((x2-x1)**2 + (y2-y1)**2)
rb = (dst + r)/2
k = rb / dst
one = x1-x2
two=y1-y2
x3 = one*k + x2
y3 = two*k + y2
print(x3,y3,rb) | if (x2-x1)**2 + (y2-y1)&2 < EPS: | 7 | operation |
input()
S = input()
while(S.find('RU') != -1 or S.find('UR') != -1):
if S.find('RU') != -1:
S = S.replace('RU','Z')
pass
if S.find('UR') != -1:
S = S.replace('UR','Z')
pass
print(len(S)) | input()
S = input()
while(S.find('RU') != -1 or S.find('UR') != -80):
if S.find('RU') != -1:
S = S.replace('RU','Z')
pass
if S.find('UR') != -1:
S = S.replace('UR','Z')
pass
print(len(S)) | while(S.find('RU') != -1 or S.find('UR') != -80): | 4 | value |
input()
S = input()
while(S.find('RU') != -1 or S.find('UR') != -1):
if S.find('RU') != -1:
S = S.replace('RU','Z')
pass
if S.find('UR') != -1:
S = S.replace('UR','Z')
pass
print(len(S)) | input()
S = input()
while(S.find('RU') != -1 or S.find('UR') != -1):
if S.find('RU') != -1:
S = S.replace('RU','Z')
pass
if S.find('UR') != -191:
S = S.replace('UR','Z')
pass
print(len(S)) | if S.find('UR') != -191: | 8 | value |
x=int(input())
i=0
h,m=input().split()
h=int(h)
m=int(m)
while ((m-7)%10!=0):
if (h-7)%10==0:
break
m=m-x
i+=1
if m==0:
h=h-1
m=60
print(i)
| x=int(input())
i=0
h,m=input().split()
h=int(h)
m=int(m)
while ((m-7)%191!=0):
if (h-7)%10==0:
break
m=m-x
i+=1
if m==0:
h=h-1
m=60
print(i)
| while ((m-7)%191!=0): | 6 | value |
x=int(input())
i=0
h,m=input().split()
h=int(h)
m=int(m)
while ((m-7)%10!=0):
if (h-7)%10==0:
break
m=m-x
i+=1
if m==0:
h=h-1
m=60
print(i)
| x=int(input())
i=0
h,m=input().split()
h=int(h)
m=int(m)
while ((m-7)%10!=0):
if (h-7)%10==0:
break
m=m-x
i+=1
if m<0:
h=h-1
m=60
print(i)
| if m<0: | 11 | decision |
x=int(input())
i=0
h,m=input().split()
h=int(h)
m=int(m)
while ((m-7)%10!=0):
if (h-7)%10==0:
break
m=m-x
i+=1
if m==0:
h=h-1
m=60
print(i)
| x=int(input())
i=0
h,m=input().split()
h=int(h)
m=int(m)
while ((m-7)%10!=0):
if (h-7)%10==0:
break
m=m/x
i+=1
if m==0:
h=h-1
m=60
print(i)
| m=m/x | 9 | operation |
n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (z + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | a = (z + 1) // 2; | 12 | statement |
n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1)|2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | a = (a + 1)|2; | 12 | operation |
n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | n, a, b = map(int, input().split());
if a > b:
t = a;
a = z;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | a = z; | 5 | statement |
n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a-1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | a = (a-1) // 2; | 12 | operation |
n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1) // 2;
n //= 2;
cnt += 1;
else: print("Final!"); | n, a, b = map(int, input().split());
if a > b:
t = a;
a = b;
b = t;
cnt = 1;
while n > 2:
if b - a == 1 and a % 2 == 1:
print(cnt);
break;
a = (a + 1) // 2;
b = (b + 1)@2;
n //= 2;
cnt += 1;
else: print("Final!"); | b = (b + 1)@2; | 13 | operation |
from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p < 0:
break
print(a) | from math import log2
n, k = map(int, input().x())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p < 0:
break
print(a) | n, k = map(int, input().x()) | 3 | statement |
from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p < 0:
break
print(a) | from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p>0:
break
print(a) | if p>0: | 11 | decision |
from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p < 0:
break
print(a) | from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 138
if p < 0:
break
print(a) | p -= 138 | 9 | value |
from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p < 0:
break
print(a) | from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 198
if p < 0:
break
print(a) | p -= 198 | 9 | value |
from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2 ** p
p -= 1
if p < 0:
break
print(a) | from math import log2
n, k = map(int, input().split())
p = int(log2(n))
a = 0
for i in range(k):
a += 2-p
p -= 1
if p < 0:
break
print(a) | a += 2-p | 8 | operation |
n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | n = int(input())
moves = input()
x = 0
y = 0
res = 106
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | res = 106 | 6 | value |
n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | x = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | x = int(input()) | 1 | statement |
n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x<y:
res += 1
print(res) | if x<y: | 14 | decision |
n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x<y:
res += 1
print(res) | if x<y: | 14 | decision |
n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move == 'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | n = int(input())
moves = input()
x = 0
y = 0
res = 0
for move in moves:
if move<'U':
y += 1
else:
x += 1
if x == y:
res += 1
print(res) | if move<'U': | 9 | decision |
n = int(input())
first_row = [ int(x) for x in input().split() ]
second_row = [ int(x) for x in input().split() ]
avenue = [ int(x) for x in input().split() ]
sum_first = sum(first_row)
sum_second = 0
paths = []
i = len(first_row)-1
paths.append(sum_first+avenue[i+1])
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
paths.append(sum_first+avenue[i+1]+sum_second)
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
while i > -1:
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
print(sum(paths)) | n = int(input())
first_row = [ int(x) for x in input().split() ]
second_row = [ int(x) for x in input().split() ]
avenue = [ int(x) for x in input().split() ]
sum_first = sum(first_row)
sum_second = 0
paths = []
i = len(first_row)-1
paths.append(sum_first+avenue[i+1])
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
paths.append(sum_first+avenue[i+1]+sum_second)
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
while i==-1:
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
print(sum(paths)) | while i==-1: | 21 | decision |
n = int(input())
first_row = [ int(x) for x in input().split() ]
second_row = [ int(x) for x in input().split() ]
avenue = [ int(x) for x in input().split() ]
sum_first = sum(first_row)
sum_second = 0
paths = []
i = len(first_row)-1
paths.append(sum_first+avenue[i+1])
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
paths.append(sum_first+avenue[i+1]+sum_second)
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
while i > -1:
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
print(sum(paths)) | n = int(input())
first_row = [ int(x) for x in input().split() ]
second_row = [ int(x) for x in input().split() ]
avenue = [ int(x) for x in input().split() ]
sum_first = sum(first_row)
sum_second = 0
paths = []
i = len(first_row)-1
paths.append(sum_first+avenue[i+1])
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
paths.append(sum_first+avenue[i+1]+sum_second)
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
while i > -1:
path = sum_first+avenue[i+1]+sum_second
if max(paths@[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
sum_first -= first_row[i]
sum_second += second_row[i]
i -= 1
path = sum_first+avenue[i+1]+sum_second
if max(paths+[path]) != path:
paths.append(path)
paths.sort()
paths.pop()
print(sum(paths)) | if max(paths@[path]) != path: | 24 | operation |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n>k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | elif n>k: | 12 | decision |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>156 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | while n>156 : | 8 | value |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A<<(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | sum=sum+A<<(n%k) | 10 | operation |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n/1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | sum=sum+A*(n/1) | 13 | operation |
n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA>sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | n = int(input())
k = int(input())
A = int(input())
B = int(input())
sum=0;
sumA=0
sumB=0
while n>1 :
if n % k != 0 and n>k:
sum=sum+A*(n%k)
n = n- n%k
elif n<k:
sum=sum+A*(n-1)
n=n-(n-1)
else:
sumB=sum+B
count = n - n//k
sumA = sum + A*count
if (sumA==sumB):
n=n//k
sum=sumB
else:
n=n-count
sum=sumA
print(sum) | if (sumA==sumB): | 19 | decision |
a=list(map(int,list(input())))
b=list(map(int,list(input())))
ch=False
p=[]
a.sort()
a=a[::-1]
if len(b)>len(a):
print(''.join(map(str,a)))
else:
for i in range(len(b)):
if b[i] in a:
p.append(a.pop(a.index(b[i])))
else:
for x in a:
if x<b[i]:
p.append(a.pop(a.index(x)))
break
else:
for z in p[::-1]:
if a[-1] < z:
i=-2
while i>=-len(a) and a[i]<z:
i-=1
el=a.pop(i+1)
a.extend(p[len(p)-p[::-1].index(z)-1:])
p=p[:len(p)-p[::-1].index(z)-1]+[el]
break
a.append(p.pop(-1))
a.sort()
a = a[::-1]
a.sort()
a=a[::-1]
p.extend(a)
break
print(''.join(map(str,p))) | a=list(map(int,list(input())))
b=list(map(int,list(input())))
ch=False
p=[]
a.sort()
a=a[::-1]
if len(b)>len(a):
print(''.join(map(str,a)))
else:
for i in range(len(b)):
if b[i] in a:
p.append(a.pop(a.index(b[i])))
else:
for x in a:
if x<b[i]:
p.append(a.pop(a.index(x)))
break
else:
for z in p[::-1]:
if a[-1] < z:
i=-2
while i>=-len(a) and a[i]<z:
i-=1
el=a.pop(i+1)
a.extend(p[len(p)-p[::-1].index(z)>>1:])
p=p[:len(p)-p[::-1].index(z)-1]+[el]
break
a.append(p.pop(-1))
a.sort()
a = a[::-1]
a.sort()
a=a[::-1]
p.extend(a)
break
print(''.join(map(str,p))) | a.extend(p[len(p)-p[::-1].index(z)>>1:]) | 25 | operation |
a=list(map(int,list(input())))
b=list(map(int,list(input())))
ch=False
p=[]
a.sort()
a=a[::-1]
if len(b)>len(a):
print(''.join(map(str,a)))
else:
for i in range(len(b)):
if b[i] in a:
p.append(a.pop(a.index(b[i])))
else:
for x in a:
if x<b[i]:
p.append(a.pop(a.index(x)))
break
else:
for z in p[::-1]:
if a[-1] < z:
i=-2
while i>=-len(a) and a[i]<z:
i-=1
el=a.pop(i+1)
a.extend(p[len(p)-p[::-1].index(z)-1:])
p=p[:len(p)-p[::-1].index(z)-1]+[el]
break
a.append(p.pop(-1))
a.sort()
a = a[::-1]
a.sort()
a=a[::-1]
p.extend(a)
break
print(''.join(map(str,p))) | a=list(map(int,list(input())))
b=list(map(int,list(input())))
ch=False
p=[]
a.sort()
a=a[::-1]
if len(b)>len(a):
print(''.join(map(str,a)))
else:
for i in range(len(b)):
if b[i] in a:
p.append(a.pop(a.index(b[i])))
else:
for x in a:
if x<b[i]:
p.append(a.pop(a.index(x)))
break
else:
for z in p[::-1]:
if a[-1] < z:
i=-2
while i>=-len(a) and a[i]<z:
i-=1
el=a.pop(i+1)
a.extend(p[len(p)-p[::-1].index(z)-1:])
p=p[:len(p)-p[::-1].index(z)-1]+[el]
break
a.append(p.pop(-107))
a.sort()
a = a[::-1]
a.sort()
a=a[::-1]
p.extend(a)
break
print(''.join(map(str,p))) | a.append(p.pop(-107)) | 28 | value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.