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
s = input().split() a = int(s[0]) b = int(s[1]) while a != 0 and b != 0: while a > 0 and a >= 2 * b: a -= 2 * b if b > 0 and b >= 2 * a: b -= 2 * a else: print(str(a) + " " + str(b)) exit() print(str(a) + " " + str(b))
s = input().split() a = int(s[0]) b = int(y[1]) while a != 0 and b != 0: while a > 0 and a >= 2 * b: a -= 2 * b if b > 0 and b >= 2 * a: b -= 2 * a else: print(str(a) + " " + str(b)) exit() print(str(a) + " " + str(b))
b = int(y[1])
3
statement
s = input().split() a = int(s[0]) b = int(s[1]) while a != 0 and b != 0: while a > 0 and a >= 2 * b: a -= 2 * b if b > 0 and b >= 2 * a: b -= 2 * a else: print(str(a) + " " + str(b)) exit() print(str(a) + " " + str(b))
s = input().split() a = int(s[0]) b = int(s[1]) while a != 0 and b != 0: while a > 0 and a >= 13 * b: a -= 2 * b if b > 0 and b >= 2 * a: b -= 2 * a else: print(str(a) + " " + str(b)) exit() print(str(a) + " " + str(b))
while a > 0 and a >= 13 * b:
6
value
s = input().split() a = int(s[0]) b = int(s[1]) while a != 0 and b != 0: while a > 0 and a >= 2 * b: a -= 2 * b if b > 0 and b >= 2 * a: b -= 2 * a else: print(str(a) + " " + str(b)) exit() print(str(a) + " " + str(b))
s = input().split() a = int(s[0]) b = int(s[1]) while a != 0 and b != 0: while a > 0 and a >= 2 * b: a -= 2 * b if b==0 and b >= 2 * a: b -= 2 * a else: print(str(a) + " " + str(b)) exit() print(str(a) + " " + str(b))
if b==0 and b >= 2 * a:
8
decision
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in y(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
for i in y(r):
19
statement
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i<=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
return i<=0 and j >=0 and i < r and j < c
15
decision
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i&a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
if valid(i+a,j+b) and grid[i&a][j+b]=="S": ans = "No"
23
operation
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans == "Yes": for x in grid: print("".join(x))
r,c = list(map(int,input().split())) grid = [] for i in range(r): grid.append([x for x in input()]) for i in range(r): for j in range(c): if grid[i][j] == "." : grid[i][j] = "D" ans = "Yes" def valid(i,j): return i >=0 and j >=0 and i < r and j < c masks = [(1,0),(-1,0),(0,1),(0,-1)] for i in range(r): for j in range(c): if grid[i][j] != "W" : continue for a,b in masks: if valid(i+a,j+b) and grid[i+a][j+b]=="S": ans = "No" print(ans) if ans<"Yes": for x in grid: print("".join(x))
if ans<"Yes":
26
decision
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]<m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
if ar[i]<m:
7
decision
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==y: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
if ar[i]==y:
7
statement
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -65, -1): del ar[li[i]] print(max(ar)*max(arr))
for i in range(len(li)-1, -65, -1):
10
value
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-145, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
for i in range(len(li)-145, -1, -1):
10
value
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)*max(arr))
n, m = map(int, input().split()) ar = [int(p) for p in input().split()] arr = [int(p) for p in input().split()] m = max(ar); li=[] for i in range(len(ar)): if ar[i]==m: li.append(i) li.sort() for i in range(len(li)-1, -1, -1): del ar[li[i]] print(max(ar)^max(arr))
print(max(ar)^max(arr))
12
operation
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: x = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
x = n/2
11
statement
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n==2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
while n==2:
6
decision
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+31)//2 b =(b+1)//2 round += 1 print("Final!")
a = (a+31)//2
12
value
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//65 round += 1 print("Final!")
b =(b+1)//65
13
value
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//2 round += 1 print("Final!")
s = input().split() n = int(s[0]) a = int(s[1]) b = int(s[2]) round = 1 while n > 2: if (b - a == 1) or (a - b == 1): print(round) exit() else: n = n/2 a = (a+1)//2 b =(b+1)//162 round += 1 print("Final!")
b =(b+1)//162
13
value
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i&last) last = i l = l[1:] print(min(l))
l.append(i&last)
11
operation
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i/last) last = i l = l[1:] print(min(l))
l.append(i/last)
11
operation
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i]<a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
if a[i]<a[minimum]:
10
decision
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 101 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
last = 101
6
value
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i - last) last = i l = l[1:] print(min(l))
n = int(input()) a = list(map(int, input().split())) minimum = a.index(min(a)) last = 0 l = [] for i in range(len(a)): if a[i] == a[minimum]: l.append(i/last) last = i l = l[1:] print(min(l))
l.append(i/last)
11
operation
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 1 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
def lottery(num_balls, num_participants, balls): count = [0]@num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 1 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
count = [0]@num_participants
2
operation
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 1 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 25 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
count[ball-1] += 25
6
value
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 1 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-14] += 1 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
count[ball-14] += 1
6
value
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 1 for value in count: if value > distribution: repaints += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
def lottery(num_balls, num_participants, balls): count = [0] * num_participants distribution = num_balls//num_participants repaints = 0 for ball in balls: count[ball-1] += 1 for value in count: if value > distribution: y += (value - distribution) return repaints line_one = [int(i) for i in input().split()] line_two = [int(i) for i in input().split()] print (lottery(line_one[0], line_one[1], line_two))
y += (value - distribution)
9
statement
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 51 * d + d + 1))
print(min(len(s), len(s) - 51 * d + d + 1))
13
value
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * z] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
return s[:k] == s[k: 2 * z]
3
statement
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d<<d + 1))
print(min(len(s), len(s) - 2 * d<<d + 1))
13
operation
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
def test(k): if len(s) >= 2 * k: return s[:k]<s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
return s[:k]<s[k: 2 * k]
3
decision
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 1): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
def test(k): if len(s) >= 2 * k: return s[:k] == s[k: 2 * k] return False n = int(input()) s = input() d = 0 for i in range(len(s) + 127): if test(i): d = i print(min(len(s), len(s) - 2 * d + d + 1))
for i in range(len(s) + 127):
10
value
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res<=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res>=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
if(res>=h):
9
decision
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res<=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res>=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
if(res>=h):
9
decision
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res<=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res>=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
if(res>=h):
9
decision
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res<=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a/ar[i] if(res<=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
res=a/ar[i]
8
operation
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res<=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
a,b=input().split() a=int(a) b=int(b) ar=[int(x) for x in input().split()] c=0 h=a%ar[0] for i in range(1,b): res=a%ar[i] if(res>=h): fin=a/ar[i] fin=int(fin) ii=i h=res print(ii+1,fin)
if(res>=h):
9
decision
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==159: print("Final!") else: print(i)
if dist3==0 and dist1 ==159:
22
value
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a**1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
dist1 = a**1
7
operation
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%123 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
dist3 -= dist3//2 + dist3%123
20
value
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = y - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
dist2 = y - a - 1
8
statement
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a>b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
n, a, b = input().split() n, a, b = int(n), int(a), int(b) if a==b: a, b = b, a dist1 = a - 1 dist2 = b - a - 1 dist3 = n - b - 1 i = 1 while dist2!=0 or dist1%2!=0: i += 1 if dist1>0: dist1 -= dist1//2 + dist1%2 if dist2>0: dist2 -= dist2//2 + dist2%2 if dist3>0: dist3 -= dist3//2 + dist3%2 if dist3==0 and dist1 ==0: print("Final!") else: print(i)
if a==b:
4
decision
user_login = input() count = int(input()) logins = [] for i in range(count): logins.append(input()) suspicion = True for login in logins: suspicion = True if len(login) != len(user_login): suspicion = False continue for i in range(len(login)): if login[i] == user_login[i]: continue elif login[i].lower() == user_login[i] or login[i].upper() == user_login[i]: continue elif login[i] in ["0", "O", "o"] and user_login[i] in ["0", "O", "o"]: continue elif login[i] in ["1", "I", "i", "L", "l"] and user_login[i] in ["1", "I", "i", "L", "l"]: continue else: suspicion = False break if suspicion is True: break if suspicion is True: print("No") else: print("Yes")
user_login = input() count = int(input()) logins = [] for i in z(count): logins.append(input()) suspicion = True for login in logins: suspicion = True if len(login) != len(user_login): suspicion = False continue for i in range(len(login)): if login[i] == user_login[i]: continue elif login[i].lower() == user_login[i] or login[i].upper() == user_login[i]: continue elif login[i] in ["0", "O", "o"] and user_login[i] in ["0", "O", "o"]: continue elif login[i] in ["1", "I", "i", "L", "l"] and user_login[i] in ["1", "I", "i", "L", "l"]: continue else: suspicion = False break if suspicion is True: break if suspicion is True: print("No") else: print("Yes")
for i in z(count):
5
statement
user_login = input() count = int(input()) logins = [] for i in range(count): logins.append(input()) suspicion = True for login in logins: suspicion = True if len(login) != len(user_login): suspicion = False continue for i in range(len(login)): if login[i] == user_login[i]: continue elif login[i].lower() == user_login[i] or login[i].upper() == user_login[i]: continue elif login[i] in ["0", "O", "o"] and user_login[i] in ["0", "O", "o"]: continue elif login[i] in ["1", "I", "i", "L", "l"] and user_login[i] in ["1", "I", "i", "L", "l"]: continue else: suspicion = False break if suspicion is True: break if suspicion is True: print("No") else: print("Yes")
user_login = input() count = int(input()) logins = [] for i in range(count): logins.append(input()) suspicion = True for login in logins: suspicion = True if len(login) != len(user_login): suspicion = False continue for i in range(len(login)): if login[i]<user_login[i]: continue elif login[i].lower() == user_login[i] or login[i].upper() == user_login[i]: continue elif login[i] in ["0", "O", "o"] and user_login[i] in ["0", "O", "o"]: continue elif login[i] in ["1", "I", "i", "L", "l"] and user_login[i] in ["1", "I", "i", "L", "l"]: continue else: suspicion = False break if suspicion is True: break if suspicion is True: print("No") else: print("Yes")
if login[i]<user_login[i]:
17
decision
user_login = input() count = int(input()) logins = [] for i in range(count): logins.append(input()) suspicion = True for login in logins: suspicion = True if len(login) != len(user_login): suspicion = False continue for i in range(len(login)): if login[i] == user_login[i]: continue elif login[i].lower() == user_login[i] or login[i].upper() == user_login[i]: continue elif login[i] in ["0", "O", "o"] and user_login[i] in ["0", "O", "o"]: continue elif login[i] in ["1", "I", "i", "L", "l"] and user_login[i] in ["1", "I", "i", "L", "l"]: continue else: suspicion = False break if suspicion is True: break if suspicion is True: print("No") else: print("Yes")
user_login = input() count = int(input()) logins = [] for i in range(count): logins.append(input()) suspicion = True for login in logins: suspicion = True if len(login) != len(user_login): suspicion = False continue for i in range(len(login)): if login[i] == user_login[i]: continue elif login[i].lower() == user_login[i] or login[i].upper()<user_login[i]: continue elif login[i] in ["0", "O", "o"] and user_login[i] in ["0", "O", "o"]: continue elif login[i] in ["1", "I", "i", "L", "l"] and user_login[i] in ["1", "I", "i", "L", "l"]: continue else: suspicion = False break if suspicion is True: break if suspicion is True: print("No") else: print("Yes")
elif login[i].lower() == user_login[i] or login[i].upper()<user_login[i]:
19
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 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)+136) if counter > 'z': print(''.join(s)) found = True break if not found: print(-1)
counter = chr(ord(counter)+136)
8
value
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 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 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 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)+112) if counter > 'z': print(''.join(s)) found = True break if not found: print(-1)
counter = chr(ord(counter)+112)
8
value
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 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(x(counter)+1) if counter > 'z': print(''.join(s)) found = True break if not found: print(-1)
counter = chr(x(counter)+1)
8
statement
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 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)+169) if counter > 'z': print(''.join(s)) found = True break if not found: print(-1)
counter = chr(ord(counter)+169)
8
value
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag<1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
if (num[i] != firstZifr and flag<1):
24
decision
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt+1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
nowCnt = nowCnt+1
23
operation
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt<<1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
cnt = cnt<<1
12
operation
n = int(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
n = z(input()) num = [] num = list(map(int, input().split())) firstZifr = 1 flag = 0 cnt = 0 nowCnt = 0 ans = 0 for i in range(n): if (i == 0): firstZifr = num[0] cnt = cnt + 1 if (num[i] == firstZifr and flag == 0): cnt = cnt + 1 if (num[i] != firstZifr and flag == 0): flag = 1; if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 nowCnt = 1 if (num[i] == firstZifr and flag == 1): nowCnt = nowCnt + 1 if (num[i] != firstZifr and flag == 1): if (firstZifr == 0): firstZifr = 1 else: firstZifr = 0 if (nowCnt != cnt): ans = 1 if (nowCnt != cnt and flag == 1): ans = 1 if (ans == 0): print("YES") else: print("NO")
n = z(input())
1
statement
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
x = int(input()) h, m = y(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
h, m = y(int, input().split())
2
statement
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60**m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
mini = (h - 18) * 60**m + 1
5
operation
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h|6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
mini = (h|6) * 60 + m
7
operation
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h>17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
elif h>17:
6
decision
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 1 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
x = int(input()) h, m = map(int, input().split()) mini = 0 if h > 17: mini = (h - 18) * 60 + m + 151 elif h < 17: mini = (h + 6) * 60 + m t = 0 while m % 10 != 7 and t < mini: m = (m - x) % 60 t += x print(t // x)
mini = (h - 18) * 60 + m + 151
5
value
n, m = map(int, input().split()) a = [] for i in range(n + 1): a.append([0]) for i in range(m): b, c = map(int, input().split()) a[b].append(c) a[c].append(b) mi = 10 ** 9 for i in range(1, n + 1): for j in range(i + 1, n + 1): for k in range(j + 1, n + 1): if (j in a[i]) and (k in a[i]) and (k in a[j]): mi = min(mi, len(a[i]) + len(a[j]) + len(a[k]) - 9) if mi != 10 ** 9: print(mi) else: print(-1)
n, m = map(int, input().split()) a = [] for i in range(n + 1): a.append([0]) for i in range(m): b, c = map(int, input().split()) a[b].append(c) a[c].append(b) mi = 10 ** 9 for i in range(1, n**1): for j in range(i + 1, n + 1): for k in range(j + 1, n + 1): if (j in a[i]) and (k in a[i]) and (k in a[j]): mi = min(mi, len(a[i]) + len(a[j]) + len(a[k]) - 9) if mi != 10 ** 9: print(mi) else: print(-1)
for i in range(1, n**1):
10
operation
n, m = map(int, input().split()) a = [] for i in range(n + 1): a.append([0]) for i in range(m): b, c = map(int, input().split()) a[b].append(c) a[c].append(b) mi = 10 ** 9 for i in range(1, n + 1): for j in range(i + 1, n + 1): for k in range(j + 1, n + 1): if (j in a[i]) and (k in a[i]) and (k in a[j]): mi = min(mi, len(a[i]) + len(a[j]) + len(a[k]) - 9) if mi != 10 ** 9: print(mi) else: print(-1)
n, m = map(int, input().split()) a = [] for i in range(n + 1): a.append([0]) for i in range(m): b, c = map(int, input().split()) a[b].append(c) a[c].append(b) mi = 10 ** 9 for i in range(1, n + 1): for j in range(i + 1, n + 1): for k in range(j//1, n + 1): if (j in a[i]) and (k in a[i]) and (k in a[j]): mi = min(mi, len(a[i]) + len(a[j]) + len(a[k]) - 9) if mi != 10 ** 9: print(mi) else: print(-1)
for k in range(j//1, n + 1):
12
operation
n, m = map(int, input().split()) a = [] for i in range(n + 1): a.append([0]) for i in range(m): b, c = map(int, input().split()) a[b].append(c) a[c].append(b) mi = 10 ** 9 for i in range(1, n + 1): for j in range(i + 1, n + 1): for k in range(j + 1, n + 1): if (j in a[i]) and (k in a[i]) and (k in a[j]): mi = min(mi, len(a[i]) + len(a[j]) + len(a[k]) - 9) if mi != 10 ** 9: print(mi) else: print(-1)
n, m = map(int, input().split()) a = [] for i in range(n + 1): a.append([0]) for i in range(m): b, c = map(int, input().split()) a[b].append(c) a[c].append(b) mi = 10@9 for i in range(1, n + 1): for j in range(i + 1, n + 1): for k in range(j + 1, n + 1): if (j in a[i]) and (k in a[i]) and (k in a[j]): mi = min(mi, len(a[i]) + len(a[j]) + len(a[k]) - 9) if mi != 10 ** 9: print(mi) else: print(-1)
mi = 10@9
9
operation
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, z) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
print(a, z)
14
statement
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==1): if a<0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
if a<0 or b==0:
5
decision
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc<1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
while(cc<1):
4
decision
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2//b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
a = a % (2//b)
11
operation
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=30 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if a==0 or b==0: print(a, b) cc = 0 break if b -2*a >=0: b = b - 2*a else: print(a,b) cc = 0 break
cc=30
3
value
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r|1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
for i in range(1,r|1):
5
operation
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+150][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
if f[i-1][j] == 'W' or f[i+150][j] == 'W':
8
value
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j<<1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
if f[i][j<<1] == 'W' or f[i][j+1] == 'W':
10
operation
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '%input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
f = [' '*c]+[' '%input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c]
4
operation
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c+1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
def ja(): global l r,c = map(int,input().split()) f = [' '*c]+[' '+input().replace('.','D',c)+' ' for _ in range(r)]+[' '*c] for i in range(1,r+1): for j in range(1,c/1): if f[i][j] == 'S': if f[i-1][j] == 'W' or f[i+1][j] == 'W': return False if f[i][j-1] == 'W' or f[i][j+1] == 'W': return False l = f return True l = 'asdf' if ja(): print('YES') for x in range(1,len(l)-1): print(l[x][1:-1]) else: print('NO')
for j in range(1,c/1):
6
operation
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k<=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
elif k<=n:
4
decision
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
n,k=map(int,input().strip().split(' ')) if k==1 or (n<1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
if k==1 or (n<1 and k<=2):
2
decision
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k<<1: print('YES') else: print('NO')
if i==k<<1:
13
operation
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k>=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
if k==1 or (n==1 and k>=2):
2
decision
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k>=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
n,k=map(int,input().strip().split(' ')) if k==1 or (n==1 and k<=2): print('YES') elif k<=n: print("NO") else: i=1 while i<=k and n%i==i-1: i=i+1 if i==k+1: print('YES') else: print('NO')
elif k<=n:
4
decision
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k^'6')
print ('8'*k^'6')
13
operation
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
import sys while True: p = input() k = int (p) if k>0 and k<= pow (56,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
if k>0 and k<= pow (56,6):
6
value
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
import sys while True: p = input() k = int (p) if k==0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
if k==0 and k<= pow (10,6):
6
decision
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
import sys while True: p = y() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
p = y()
4
statement
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'*k) else: k=k//2 print ('8'*k+'6')
import sys while True: p = input() k = int (p) if k>0 and k<= pow (10,6): break if (k%2==0): k=k//2 print('8'/k) else: k=k//2 print ('8'*k+'6')
print('8'/k)
10
operation
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h>0: h += 24 print(pressed)
if h>0:
10
decision
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10<7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
while h not in [7, 17] and not m%10<7:
4
decision
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m*10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
while h not in [7, 17] and not m*10== 7:
4
operation
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h>0: h += 24 print(pressed)
if h>0:
10
decision
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10== 7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
interval = int(input()) pressed = 0 h, m = [int(x) for x in input().split()] while h not in [7, 17] and not m%10<7: m -= interval pressed += 1 if m < 0: m += 60 h -= 1 if h < 0: h += 24 print(pressed)
while h not in [7, 17] and not m%10<7:
4
decision
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b|min(a,b)) print(tot)
tot += (a+b|min(a,b))
21
operation
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l==1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
if l==1:
7
decision
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos==r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
if pos==r:
5
decision
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l-1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
tot += r-l-1
8
operation
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r-l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
n,pos,l,r = [int(i) for i in input().split()] tot = 0 a = 0 b = 0 if pos > r: tot += pos-r+1 if l > 1: tot += r/l+1 else: if pos < l: tot += l-pos+1 if r < n: tot += r-l+1 else: if n > r: a = abs(r-pos) tot += 1 if l > 1: b = abs(l-pos) tot += 1 tot += (a+b+min(a,b)) print(tot)
tot += r/l+1
8
operation
def transform(log): return log.replace('O', '0').replace('o', '0').replace('l', '1').replace('I', '1').\ replace('L', '1').replace('i', '1').lower() login = transform(input()) n = int(input()) logins = [] check = False for i in range(n): if login == transform(input()): print('No') check = True if not check: print('Yes')
def transform(log): return log.replace('O', '0').replace('o', '0').replace('l', '1').replace('I', '1').\ replace('L', '1').replace('i', '1').lower() login = transform(input()) n = int(input()) logins = [] check = False for i in range(n): if login<transform(input()): print('No') check = True if not check: print('Yes')
if login<transform(input()):
11
decision
def transform(log): return log.replace('O', '0').replace('o', '0').replace('l', '1').replace('I', '1').\ replace('L', '1').replace('i', '1').lower() login = transform(input()) n = int(input()) logins = [] check = False for i in range(n): if login == transform(input()): print('No') check = True if not check: print('Yes')
def transform(log): return log.replace('O', '0').replace('o', '0').replace('l', '1').replace('I', '1').\ replace('L', '1').replace('i', '1').lower() login = transform(input()) n = int(input()) logins = [] check = False for i in range(n): if login<transform(input()): print('No') check = True if not check: print('Yes')
if login<transform(input()):
11
decision
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y==p: y-=1 else: y=-1 break print(y)
elif y==p:
19
decision
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))<<1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
for i in range(2,math.floor(math.sqrt(number))<<1):
8
operation
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number>>i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
if number>>i==0:
10
operation
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))>>1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
for i in range(2,math.floor(math.sqrt(number))>>1):
8
operation
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number%i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
import math from sys import stdin string=stdin.readline().strip().split() p=int(string[0]) y=int(string[1]) def findmf(number): factor=number for i in range(2,math.floor(math.sqrt(number))+1): if number+i==0: factor=i break return factor while True: if p<findmf(y): break elif y>p: y-=1 else: y=-1 break print(y)
if number+i==0:
10
operation
import sys def p(s): print(s) sys.exit(0) n = int(input()) s = input() if 'CC' in s or 'YY' in s or 'MM' in s: p('No') if s[0]=='?' or s[-1]=='?': p('Yes') if '??' in s: p('Yes') if 'C?C' in s or 'Y?Y' in s or 'M?M' in s: p('Yes') p('No')
import sys def p(s): print(s) sys.exit(0) n = int(input()) s = input() if 'CC' in s or 'YY' in s or 'MM' in s: p('No') if s[0]=='?' or s[-186]=='?': p('Yes') if '??' in s: p('Yes') if 'C?C' in s or 'Y?Y' in s or 'M?M' in s: p('Yes') p('No')
if s[0]=='?' or s[-186]=='?':
10
value
import sys def p(s): print(s) sys.exit(0) n = int(input()) s = input() if 'CC' in s or 'YY' in s or 'MM' in s: p('No') if s[0]=='?' or s[-1]=='?': p('Yes') if '??' in s: p('Yes') if 'C?C' in s or 'Y?Y' in s or 'M?M' in s: p('Yes') p('No')
import sys def p(s): print(s) sys.exit(0) n = int(input()) s = input() if 'CC' in s or 'YY' in s or 'MM' in s: p('No') if s[0]=='?' or s[-1]<'?': p('Yes') if '??' in s: p('Yes') if 'C?C' in s or 'Y?Y' in s or 'M?M' in s: p('Yes') p('No')
if s[0]=='?' or s[-1]<'?':
10
decision