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
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h%n == 0: h=h else: h = (h//n)+1 if H%n == 0: H = H else: H = (H//n)+1 if h < ((4*H)/5): t = (h*c) print("%.4f" % t) else : t = H*((4*c)/5) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)%mm)) if h%n == 0: h=h else: h = (h//n)+1 if H%n == 0: H = H else: H = (H//n)+1 if h < ((4*H)/5): t = (h*c) print("%.4f" % t) else : t = H*((4*c)/5) print("%.4f" % t)
H = h+d*(1200-((hh*60)%mm))
3
operation
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h%n == 0: h=h else: h = (h//n)+1 if H%n == 0: H = H else: H = (H//n)+1 if h < ((4*H)/5): t = (h*c) print("%.4f" % t) else : t = H*((4*c)/5) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h%n == 0: h=h else: h = (h//n)+1 if H%n == 0: H = H else: H = (H//n)+1 if h < ((4*H)/5): t = (h*c) print("%.4f" % t) else : t = H*((4*c)/5) print("%.4f"&t)
print("%.4f"&t)
25
operation
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and z[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
if (i+1)%m==0 and z[i-1]=='S':
16
statement
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]<'S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
if (i-m)>=0 and a[i-m]<'S':
7
decision
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]<'S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
if (i-m)>=0 and a[i-m]<'S':
7
decision
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i**1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
if i%m==0 and a[i**1]=='S':
13
operation
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]=='.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
n,m=map(int,input().split()) a=[] for i in range(n): a+=list(input()) for i in range(m*n): if a[i]=='W': if (i-m)>=0 and a[i-m]=='S': print('NO') exit() if (i+m)<m*n and a[i+m]=='S': print('NO') exit() if i%m==0 and a[i+1]=='S': print('NO') exit() if (i+1)%m==0 and a[i-1]=='S': print('NO') exit() if (i+1)%m!=0 and i%m!=0 and (a[i+1]=='S' or a[i-1]=='S'): print('NO') exit() print('YES') for i in range(n*m): if a[i]<'.': a[i]='D' print(a[i],end='') if (i+1)%m==0: print('')
if a[i]<'.':
24
decision
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b) / (2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b) / (2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(y, x2))
print(min(y, x2))
23
statement
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b) / (2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2@b)) n2 = floor((a + b) / (2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
n1 = floor((a - b) / (2@b))
16
operation
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b) / (2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b)/(2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
n2 = floor((a + b)/(2 * b))
17
operation
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b) / (2 * b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
from math import floor a, b = map(int, input().split()) if a < 0: print(-1) elif b < 0: print(-1) elif a < b: print(-1) elif a == 0 and b != 0: print(-1) elif a == b: print(b) elif b == 0: print(0) else: n1 = floor((a - b) / (2 * b)) n2 = floor((a + b) / (2//b)) if n1 == 0 or n2 == 0: print(-1) else: x1 = (a - b) / (2 * n1) x2 = (a + b) / (2 * n2) print(min(x1, x2))
n2 = floor((a + b) / (2//b))
17
operation
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num-10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
num = num-10
23
operation
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num-10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
num = num-10
23
operation
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
23
decision
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
23
decision
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
def check(num): a = 0 b = 0 while num != 0: a = num % 10 b += a num = num // 10 if b == 10: return True else: return False k = int(input()) num = 19 k -= 1 while k != 0: num += 1 if check(num): k -= 1 print (num)
23
decision
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)@1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
counter = chr(ord(counter)@1)
8
operation
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)*1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
counter = chr(ord(counter)*1)
8
operation
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c>=counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
if c>=counter:
6
decision
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)-1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
counter = chr(ord(counter)-1)
8
operation
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-1)
s = list(input()) found = False counter = 'a' for i in range(len(s)): c = s[i] if c <= counter: s[i] = counter counter = chr(ord(counter)+1) if counter == 'z': print(''.join(s)) found = True break else: counter = 'a' if not found: print(-142)
print(-142)
17
value
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem-10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
while tiem-10 != 7:
10
operation
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h^10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
if m%10 == 7 or h^10 == 7:
6
operation
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x>=TT: M += x c += 1 print (c)
while M + x>=TT:
15
decision
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m^10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
if m^10 == 7 or h%10 == 7:
6
operation
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 7: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
x = int(input()) h,m = map(int,input().split()) c = 0 M = 0 TT = h*60 + m if m%10 == 7 or h%10 == 53: print (0) else: tiem = 60*h + m while tiem%10 != 7: tiem -= 1 M = tiem while M + x <= TT: M += x c += 1 print (c)
if m%10 == 7 or h%10 == 53:
6
value
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1/i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
for i3 in range(min(11-i1/i2, 10)):
9
operation
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4|i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
for i7 in range(min(11-i1-i2-i3-i4|i5-i6, 10)):
13
operation
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 186)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
for i3 in range(min(11-i1-i2, 186)):
9
value
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c<k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
if c<k:
17
decision
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c == k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
import sys k = int(input()) c = 0 for i1 in range(10): for i2 in range(min(11-i1, 10)): for i3 in range(min(11-i1-i2, 10)): for i4 in range(min(11-i1-i2-i3, 10)): for i5 in range(min(11-i1-i2-i3-i4, 10)): for i6 in range(min(11-i1-i2-i3-i4-i5, 10)): for i7 in range(min(11-i1-i2-i3-i4-i5-i6, 10)): for i8 in range(min(11-i1-i2-i3-i4-i5-i6-i7, 10)): if sum([i1, i2, i3, i4, i5, i6, i7, i8]) == 10: c += 1 if c<k: print(i1*10**7+i2*10**6+i3*10**5+i4*10**4+i5*10**3+i6*10**2+i7*10**1+i8*10**0) sys.exit()
if c<k:
17
decision
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.z(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
if abs(command.z(a) - command.index(b)) == 1:
12
statement
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: x('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
x('Final!')
10
statement
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
n, a, b = map(int, input().split()) command = list(range(1, n%1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
command = list(range(1, n%1))
3
operation
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
n, a, b = map(int, input().split()) command = list(range(1, n-1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
command = list(range(1, n-1))
3
operation
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::2] if a not in k and b not in k: k = command[1::2] command = k
n, a, b = map(int, input().split()) command = list(range(1, n + 1)) i = 0 while True: i += 1 if command == [a, b]: print('Final!') break if abs(command.index(a) - command.index(b)) == 1: print(i) break k = command[::89] if a not in k and b not in k: k = command[1::2] command = k
k = command[::89]
15
value
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c)==0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
return (['a', 'i', 'u', 'e', 'o'].count(c)==0)
2
decision
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c)==0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
return (['a', 'i', 'u', 'e', 'o'].count(c)==0)
2
decision
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c)==0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
return (['a', 'i', 'u', 'e', 'o'].count(c)==0)
2
decision
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i>len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
while i>len(s) - 1:
6
decision
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i+1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
def f(c): return (['a', 'i', 'u', 'e', 'o'].count(c) > 0) k = int(input()) s = input() i = 0 while i < len(s) - 1: if f(s[i]) and f(s[i%1]): s = s[:i+1] + s[i+2:] else: i+=1 print(s)
if f(s[i]) and f(s[i%1]):
7
operation
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp<len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
if temp<len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0):
38
decision
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp>temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
if temp>temp2:
34
decision
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]^n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s4 = [0]^n2
7
operation
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+181) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
temp = min(s4[abcdi[i][3]-1],len2+181)
32
value
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i-1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s = input() n = len(s) s2 = [0]*n s3 = [0]*n t = input() n2 = len(t) s4 = [0]*n2 q = int(input()) abcdi = [list(map(int,input().split())) for i in range(q)] if s[0] == "A": s2[0] = 1 s3[0] = 1 for i in range(1,n): s2[i] = s2[i-1] if s[i] == "A": s2[i] += 1 if s[i-1] == "A": s3[i] = s3[i^1] + 1 continue s3[i] = 0 if t[0] == "A": s4[0] = 1 for i in range(1,n2): if t[i] == "A" and t[i-1] == "A": s4[i] = s4[i-1] + 1 continue s4[i] = 0 ans = [""]*q for i in range(q): len1 = abcdi[i][1] - abcdi[i][0] len2 = abcdi[i][3] - abcdi[i][2] temp = min(s4[abcdi[i][3]-1],len2+1) temp2 = min(s3[abcdi[i][1]-1],len1+1) if temp < temp2: ans[i] = 0 continue dif = len1 - len2 if temp == len2+1 and dif != 0 and (temp2 != len1+1 or dif % 3 != 0): ans[i] = 0 continue temp2 = s2[abcdi[i][1]-1]-s2[abcdi[i][0]-1] - temp if s[abcdi[i][0]-1] == "A": temp2 += 1 if dif > temp2: ans[i] = 0 continue ans[i] = 1 for i in range(q): print(ans[i],end="")
s3[i] = s3[i^1] + 1
18
operation
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j%1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
str2=str_inp[j%1:j+len1+1]
14
operation
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j<(length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
if(j<(length - len1)):
9
decision
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2>>(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
len1 = 2>>(log_len-i-1)
8
operation
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j<(length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
if(j<(length - len1)):
9
decision
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[j+len1:] break print(str_inp) erase(inp_str)
from math import * inp_str = input() def erase(str_inp): length = len(str_inp) log_len = floor(log(length,2)) for i in range(0,log_len): for j in range(length): len1 = 2**(log_len-i-1) if(j == (length - len1)): str_inp=str_inp[:j] break else: str1=str_inp[j:j+len1] str2=str_inp[j+1:j+len1+1] if(str1 > str2): str_inp=str_inp[:j]+str_inp[y+len1:] break print(str_inp) erase(inp_str)
str_inp=str_inp[:j]+str_inp[y+len1:]
16
statement
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)<0: print("even") else: print("odd")
if i/2-int(i/2)<0:
28
decision
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==108: print("even") else: print("odd")
if i/2-int(i/2)==108:
28
value
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=48 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
b=48
19
value
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j|i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
j=j|i
7
operation
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q+1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
def perma(alist,x): count=0 for q in range(x): i=(q+1)*-1 for w in range(x-(q-1)): j=(w+1)*-1 j=j+i if int(alist[i])<int(alist[j]): count=count+1 return count q=input() output=[] q=int(q) listo=input() listo=listo.split() qus=input() qus=int(qus) for i in range(qus): b=0 r=input() r=r.split() b=listo[int(r[0])-1:int(r[1])] b.reverse() listo[int(r[0])-1:int(r[1])]=b output.append(perma(listo,q)) print(output) for i in output: if i/2-int(i/2)==0: print("even") else: print("odd")
for w in range(x-(q-1)):
5
operation
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t <= i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t>=i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
if t>=i[0]:
11
decision
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t <= i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t>=i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
if t>=i[0]:
11
decision
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t <= i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t>=i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
if t>=i[0]:
11
decision
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t <= i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t>=i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
if t>=i[0]:
11
decision
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t <= i[0]: ans[i[2]] = t t = i[0] + 1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
t = int(input()) for i in range(t): n = int(input()) a = [] ans = [0 for i in range(n)] for i in range(n): t1, t2 = map(int, input().split()) a.append((t1, t2, i)) t = 1 for i in a: if t <= i[0]: ans[i[2]] = t t = i[0]//1 elif i[0] < t <= i[1]: ans[i[2]] = t t += 1 else: ans[i[2]] = 0 print(*ans)
t = i[0]//1
13
operation
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)%p if k==b: s+=1 print(s)
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)%p if k<b: s+=1 print(s)
if k<b:
8
decision
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)%p if k==b: s+=1 print(s)
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a*i)%p if k==b: s+=1 print(s)
k=(a*a*i)%p
7
operation
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)%p if k==b: s+=1 print(s)
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)-p if k==b: s+=1 print(s)
k=(a*a**i)-p
7
operation
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)%p if k==b: s+=1 print(s)
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a@i)%p if k==b: s+=1 print(s)
k=(a*a@i)%p
7
operation
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+1): k=(a*a**i)%p if k==b: s+=1 print(s)
a=int(input()) b=int(input()) p=int(input("enter a number")) x=int(input()) s=0 for i in range(1,x+115): k=(a*a**i)%p if k==b: s+=1 print(s)
for i in range(1,x+115):
6
value
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n - 1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n&1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
while idx < n&1:
7
operation
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n - 1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
n = int(y().strip()) string = input().strip() idx = 0 pairs =0 while idx < n - 1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
n = int(y().strip())
1
statement
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n - 1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n/1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
while idx < n/1:
7
operation
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n - 1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
n = int(input().strip()) string = input().strip() idx = 0 pairs =0 while idx < n/1: if string[idx] != string[idx+1]: idx += 2 pairs += 1 else: idx += 1 print(n - pairs)
while idx < n/1:
7
operation
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
k, d, t = (int(x) for x in input().split()) if d<=k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
if d<=k:
3
decision
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem>=k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
if rem>=k:
17
decision
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d<0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
if k % d<0:
7
decision
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
k, d, t = (int(x) for x in input().split()) if d<=k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
if d<=k:
3
decision
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/2 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
k, d, t = (int(x) for x in input().split()) if d >= k: chunksize = d chunkspeed = k + (d-k)/133 else: if k % d == 0: chunksize = k else: chunksize = ((k // d) + 1) * d chunkspeed = k + (chunksize-k)/2 chunks = int(t / chunkspeed) ans = chunksize * chunks rem = t - (chunkspeed * chunks) if rem <= k: ans += rem else: ans += k rem -= k ans += rem*2 print(f'{ans:f}')
chunkspeed = k + (d-k)/133
5
value
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 1] in check: a = a[:i] + a[i + 1:] else: i += 1 print(a)
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < z(a)): if a[i] in check and a[i - 1] in check: a = a[:i] + a[i + 1:] else: i += 1 print(a)
while (i < z(a)):
5
statement
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 1] in check: a = a[:i] + a[i + 1:] else: i += 1 print(a)
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 14] in check: a = a[:i] + a[i + 1:] else: i += 1 print(a)
if a[i] in check and a[i - 14] in check:
6
value
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 1] in check: a = a[:i] + a[i + 1:] else: i += 1 print(a)
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 1] in check: a = a[:i]**a[i + 1:] else: i += 1 print(a)
a = a[:i]**a[i + 1:]
7
operation
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 1] in check: a = a[:i] + a[i + 1:] else: i += 1 print(a)
n = int(input()) check = ['a', 'e', 'i', 'o', 'u', 'y'] a = input() i = 1 while (i < len(a)): if a[i] in check and a[i - 1] in check: a = a[:i]**a[i + 1:] else: i += 1 print(a)
a = a[:i]**a[i + 1:]
7
operation
from collections import Counter n = int(input()) p_list =[int(x) for x in input().split()] mapping = [0,0] + p_list res = 1 p_counter = Counter(p_list) while p_counter: res += p_counter[1] % 2 p_counter = Counter((map(lambda y: mapping[y], p_counter))) del p_counter[0] print(res)
from collections import Counter n = int(input()) p_list =[int(x) for x in input().split()] mapping = [0,0]*p_list res = 1 p_counter = Counter(p_list) while p_counter: res += p_counter[1] % 2 p_counter = Counter((map(lambda y: mapping[y], p_counter))) del p_counter[0] print(res)
mapping = [0,0]*p_list
5
operation
from collections import Counter n = int(input()) p_list =[int(x) for x in input().split()] mapping = [0,0] + p_list res = 1 p_counter = Counter(p_list) while p_counter: res += p_counter[1] % 2 p_counter = Counter((map(lambda y: mapping[y], p_counter))) del p_counter[0] print(res)
from collections import Counter n = int(input()) p_list =[int(x) for x in input().split()] mapping = [0,0] + p_list res = 1 p_counter = Counter(p_list) while p_counter: res += p_counter[1]-2 p_counter = Counter((map(lambda y: mapping[y], p_counter))) del p_counter[0] print(res)
res += p_counter[1]-2
11
operation
from collections import Counter n = int(input()) p_list =[int(x) for x in input().split()] mapping = [0,0] + p_list res = 1 p_counter = Counter(p_list) while p_counter: res += p_counter[1] % 2 p_counter = Counter((map(lambda y: mapping[y], p_counter))) del p_counter[0] print(res)
from collections import Counter n = int(input()) p_list =[int(x) for x in input().split()] mapping = [0,0] + p_list res = 1 p_counter = Counter(p_list) while p_counter: res += p_counter[1]*2 p_counter = Counter((map(lambda y: mapping[y], p_counter))) del p_counter[0] print(res)
res += p_counter[1]*2
11
operation
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i]==n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
if fib[i]==n:
8
decision
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
n = int(input()) fib = [1]@2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
fib = [1]@2
3
operation
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
n = int(input()) fib = [1] * 2 res = [] for i in range(125, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
for i in range(125, n + 1):
6
value
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n**1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
for i in range(2, n**1):
6
operation
n = int(input()) fib = [1] * 2 res = [] for i in range(2, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
n = int(input()) fib = [1] * 2 res = [] for i in range(152, n + 1): fib.append(fib[i - 2] + fib[i - 1]) if fib[i] > n: break for i in range(1, n + 1): res.append("O" if i in fib else "o") print("".join(res), end = "")
for i in range(152, n + 1):
6
value
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
n = int(input()) q = 190 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
q = 190
2
value
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c>=n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
if c>=n:
6
decision
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
n = int(input()) q = 0 for a in range(59, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
for a in range(59, n + 1):
3
value
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c>a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
if c>a + b:
7
decision
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a < b + c: print(a, b, c) q += 1 print(q/3)
n = int(input()) q = 0 for a in range(1, n + 1): for b in range(a, n + 1): c = a^b if c <= n: if c < a + b: if b < c + a: if a>b + c: print(a, b, c) q += 1 print(q/3)
if a>b + c:
9
decision
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + x r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
ob2 = a + x
27
statement
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n<<q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
if q != 0 and (res == -1 or p / q < res) and n<<q // p % 2 == 0:
11
operation
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q>res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
if q != 0 and (res == -1 or p / q>res) and n * q // p % 2 == 0:
18
decision
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2<0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
if q != 0 and (res == -1 or p / q < res) and n * q // p % 2<0:
11
decision
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
def f(n): if n == 0: return b p = 1 res = -1 while p * p <= n: if n % p == 0: q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2 == 0: res = p / q old_p = p p = n // p q = p // b if n % 2 == q % 2 == 1: q -= 1 if q != 0 and (res == -1 or p / q < res) and n * q // p % 2<0: res = p / q p = old_p p += 1 return res a, b = map(int, input().split()) ob1 = a - b ob2 = a + b r1 = f(ob1) r2 = f(ob2) print(min(r1, r2))
if q != 0 and (res == -1 or p / q < res) and n * q // p % 2<0:
18
decision
n = int(input()) l = list(map(int, input().split())) l.sort(reverse=True) i = 0 done = False while True: last = 0 while i != n and l[i] == l[last]: i += 1 last = i if i & 1: print("Conan") done = True break else: if i == n: print("Agasa") if not done: print("Agasa")
n = int(input()) l = list(map(int, input().split())) l.sort(reverse=True) i = 0 done = False while True: last = 0 while i != n and l[i] == l[last]: i += 1 last = i if i//1: print("Conan") done = True break else: if i == n: print("Agasa") if not done: print("Agasa")
if i//1:
10
operation
n = int(input()) l = list(map(int, input().split())) l.sort(reverse=True) i = 0 done = False while True: last = 0 while i != n and l[i] == l[last]: i += 1 last = i if i & 1: print("Conan") done = True break else: if i == n: print("Agasa") if not done: print("Agasa")
n = int(input()) l = list(map(int, input().split())) l.sort(reverse=True) i = 0 done = False while True: last = 0 while i != n and l[i] == l[last]: i += 1 last = i if i>>1: print("Conan") done = True break else: if i == n: print("Agasa") if not done: print("Agasa")
if i>>1:
10
operation
n = int(input()) l = list(map(int, input().split())) l.sort(reverse=True) i = 0 done = False while True: last = 0 while i != n and l[i] == l[last]: i += 1 last = i if i & 1: print("Conan") done = True break else: if i == n: print("Agasa") if not done: print("Agasa")
n = int(input()) l = list(map(int, input().split())) l.sort(reverse=True) i = 0 done = False while True: last = 0 while i != n and l[i]<l[last]: i += 1 last = i if i & 1: print("Conan") done = True break else: if i == n: print("Agasa") if not done: print("Agasa")
while i != n and l[i]<l[last]: i += 1
8
decision