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
inp=lambda:map(int,input().split()) n,k=inp() n2=n a=[0]*100 i=0 while(n2>0): a[i]=n2%2 n2//=2 i+=1 cnt=i-1 cnt2=cnt sum=0 arr=[0]*(10**6+1) q=[0]*(10**6+1) for i in range(cnt,-1,-1): sum+=a[i] q[i]=a[cnt-i] if sum>k: print("No") quit() k2=k-sum beg=0 while k2>0: if beg==cnt: cnt+=1 if(q[beg]<=k2): k2-=q[beg] q[beg+1]+=2*q[beg] q[beg]=0 beg+=1 else: q[beg]-=k2 q[beg+1]+=2*k2 k2=0 print("Yes") for i in range(beg,cnt+1): for j in range(1,q[i]+1): print(cnt2-i,'', end='')
inp=lambda:map(int,input().split()) n,k=inp() n2=n a=[0]*100 i=0 while(n2>0): a[i]=n2%2 n2//=2 i+=1 cnt=i-1 cnt2=cnt sum=0 arr=[0]*(10**6+1) q=[0]*(10**6+1) for i in range(cnt,-1,-1): sum+=a[i] q[i]=a[cnt-i] if sum==k: print("No") quit() k2=k-sum beg=0 while k2>0: if beg==cnt: cnt+=1 if(q[beg]<=k2): k2-=q[beg] q[beg+1]+=2*q[beg] q[beg]=0 beg+=1 else: q[beg]-=k2 q[beg+1]+=2*k2 k2=0 print("Yes") for i in range(beg,cnt+1): for j in range(1,q[i]+1): print(cnt2-i,'', end='')
if sum==k:
24
decision
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 20^18: print(-1) else: print(ans)
if intAns > 20^18:
13
value
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
k = int(input()) ones = 0 twoes = 0 if k % 2<0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
if k % 2<0:
5
decision
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns==10^18: print(-1) else: print(ans)
if intAns==10^18:
13
decision
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
k = int(input()) ones = 0 twoes = 0 if k % 2<0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
if k % 2<0:
5
decision
k = int(input()) ones = 0 twoes = 0 if k % 2 == 0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
k = int(input()) ones = 0 twoes = 0 if k % 2<0: twoes = int(k/2) else: ones = 1 twoes = int((k-1) / 2) ans = str("8" * twoes) + str("6" * ones) intAns = int(ans) if intAns > 10^18: print(-1) else: print(ans)
if k % 2<0:
5
decision
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 128) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
return "yes" if (n + 128) % my_f(k) == 0 else "no"
13
value
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n<1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
if n + 1 < my_f(k) or n<1 and k > 1:
11
decision
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 83: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
if k > 83:
9
value
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n**1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
return "yes" if (n**1) % my_f(k) == 0 else "no"
13
operation
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1 < my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
from functools import lru_cache from math import gcd import sys sys.setrecursionlimit(100000) def sol(n, k): if k > 50: return 'no' if n + 1>my_f(k) or n == 1 and k > 1: return "no" return "yes" if (n + 1) % my_f(k) == 0 else "no" @lru_cache(maxsize=None) def my_f(n): if n == 1: return 1 r = my_f(n - 1) b = (gcd(r, n)) nn = n // b return r * nn if __name__ == "__main__": n, k = tuple(map(int, input().split())) print(sol(n, k))
if n + 1>my_f(k) or n == 1 and k > 1:
11
decision
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 1: out += (r - l) + 1 print(out)
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l)@1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 1: out += (r - l) + 1 print(out)
out += (pos-l)@1
6
operation
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 1: out += (r - l) + 1 print(out)
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 35: out += (r - l) + 1 print(out)
if l != 35:
17
value
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 1: out += (r - l) + 1 print(out)
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 136: out += (r - l) + 1 print(out)
if l != 136:
17
value
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos-l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 1: out += (r - l) + 1 print(out)
n, pos, l, r = map(int, input().split(' ')) out = 0 if l <= pos <= r: if l != 1: out += (pos*l) + 1 if r != n: out += (r-l) + 1 elif r != n: out += (r - pos) + 1 elif pos < l: out += (l - pos) + 1 if r != n: out += (r - l) + 1 else: out += (pos - r) + 1 if l != 1: out += (r - l) + 1 print(out)
out += (pos*l) + 1
6
operation
string = input() X = int(string[0]) Y = int(string[2]) x=0; y=1 while (y!=Y): x+=1 y+=1 if(x>X): print('No') break while (x<X): x+=2 if(x>X): print('No') else: print('Yes')
string = input() X = int(string[0]) Y = int(string[2]) x=0; y=1 while (y!=Y): x+=1 y+=1 if(x==X): print('No') break while (x<X): x+=2 if(x>X): print('No') else: print('Yes')
if(x==X):
8
decision
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((z, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
queue.append((z, j))
13
statement
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x^1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
if x and not visit[x^1][y] and maps[x - 1][y] in '123.':
31
operation
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x**1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
visit[x**1][y] = visit[x][y]
36
operation
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y+1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
visit[x][y+1] = visit[x][y]
48
operation
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[i])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
from collections import deque infin = float('inf') second = float('inf') third = float('inf') n, m = map(int, input().split()) visit = [[0 for i in range(m)] for j in range(n)] maps = [] queue = deque() for i in range(n): maps.append(input()) for j in range(len(maps[x])): if maps[i][j] in '1': queue.append((i, j)) visit[i][j] = 1 def bfs(err): global second, third while queue: x, y = queue.popleft() if maps[x][y] == '2' and second > visit[x][y]: second = visit[x][y] if maps[x][y] == '3' and third > visit[x][y]: third = visit[x][y] if x + 1 < n and not visit[x + 1][y] and maps[x + 1][y] in '123.': queue.append((x + 1, y)) if maps[x + 1][y] == '.': visit[x + 1][y] = visit[x][y] + 1 else: visit[x + 1][y] = visit[x][y] if x and not visit[x - 1][y] and maps[x - 1][y] in '123.': queue.append((x - 1, y)) if maps[x - 1][y] == '.': visit[x - 1][y] = visit[x][y] + 1 else: visit[x - 1][y] = visit[x][y] if y + 1 < m and not visit[x][y + 1] and maps[x][y + 1] in '123.': queue.append((x, y + 1)) if maps[x][y + 1] == '.': visit[x][y + 1] = visit[x][y] + 1 else: visit[x][y + 1] = visit[x][y] if y and not visit[x][y - 1] and maps[x][y - 1] in '123.': queue.append((x, y - 1)) if maps[x][y - 1] == '.': visit[x][y - 1] = visit[x][y] + 1 else: visit[x][y - 1] = visit[x][y] bfs(0) if second == infin or third == infin: print('-1') else: print(max(second, third) - 1)
for j in range(len(maps[x])):
11
statement
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2<0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
if n % i**2<0:
19
decision
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i<<2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
if n % i<<2 == 0:
19
operation
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
from math import sqrt def refine(n): for i in range(2,int(sqrt(x/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
for i in range(2,int(sqrt(x/2))+1):
19
statement
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(x(n))
print(x(n))
19
statement
from math import sqrt def refine(n): for i in range(2,int(sqrt(n/2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
from math import sqrt def refine(n): for i in range(2,int(sqrt(n*2))+1): if n % i**2 == 0: n = n / i return n break return n n = int(input()) previousN = 0 while n != previousN: previousN = n n = refine(previousN) print(int(n))
for i in range(2,int(sqrt(n*2))+1):
19
operation
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
import math n,m,k=map(int,input().split()) c=57 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
c=57
3
value
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac%k)) print(c)
c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac%k))
8
operation
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
import math n,m,k=map(int,input().split()) c=0 for i in y(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
for i in y(n):
4
statement
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)<<(math.factorial(k)*math.factorial(ac-k)) print(c)
c+=math.factorial(ac)<<(math.factorial(k)*math.factorial(ac-k))
8
operation
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac>=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
import math n,m,k=map(int,input().split()) c=0 for i in range(n): a=input() ac=a.count('.') if ac<=k: c+=math.factorial(ac)//(math.factorial(k)*math.factorial(ac-k)) print(c)
if ac<=k:
7
decision
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol-1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
print(kol-1)
26
operation
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m<-9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
if m<-9999999:
26
decision
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p<=L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
if p<=L[i]:
26
decision
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p<=L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
if p<=L[i]:
26
decision
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n - 1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
import sys n, k = map(int, input().split()) L = [int(el) for el in input().split()] kol = 0 p = L[0] j = 1 while p < L[n - 1]: p += k if p >= L[n/1]: print(kol + 1) sys.exit() else: m = -9999999 ind = -9999999 for i in range(j, len(L)): if p >= L[i]: m = L[i] ind = i if m == -9999999: print(-1) sys.exit() else: j = ind + 1 kol += 1 print(kol)
if p >= L[n/1]:
26
operation
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x**1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
if x >= t and not (x**1):
4
operation
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x<=t and (x & 1): print('Yes') else: print('No')
if x<=t and (x & 1):
9
decision
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x&1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
if x >= t and not (x&1):
4
operation
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
x, y = map(int, input().split()) t = y-128 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
t = y-128
2
value
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (x & 1): print('Yes') else: print('No')
x, y = map(int, input().split()) t = y-1 if y & 1: if x >= t and not (x & 1): print('Yes') else: print('No') else: if x >= t and (y & 1): print('Yes') else: print('No')
if x >= t and (y & 1):
9
statement
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1**swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
swap = 1**swap
10
operation
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
a, b = map(int, input().split()) if a>b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
if a>b:
2
decision
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
a, b = map(int, input().split()) if a>b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
if a>b:
2
decision
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
a, b = map(int, input().split()) if a>b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
if a>b:
2
decision
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div % 2: b += a break if swap: a, b = b, a print(a, b)
a, b = map(int, input().split()) if a < b: a, b = b, a swap = 1 else: swap = 0 while b: div, mod = divmod(a, b) a, b = b, mod swap = 1-swap if div|2: b += a break if swap: a, b = b, a print(a, b)
if div|2:
11
operation
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10+6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
friend=10+6
4
operation
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)<prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
if str(me)<prize_pos[-1] or str(friend)==prize_pos[-1]:
7
decision
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend@2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
for secs in range(int(friend@2)):
6
operation
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)<prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
if str(me)<prize_pos[-1] or str(friend)==prize_pos[-1]:
7
decision
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]: break me+=1 friend-=1 print(secs)
n=int(input()) prize_pos=list(input().split(' ')) me=1 friend=10**6 secs=0 for secs in range(int(friend/2)): if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]: break me+=1 friend-=1 print(secs)
if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]:
7
decision
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n>>1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
i=randint(0,1000000000000000000)%(n>>1)+1
23
operation
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2<0): print("no") else: if (isprime(n)): print("yes") else: print("no")
if (k>=n or n%2<0):
33
decision
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return y for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
return y
20
statement
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i*i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
from random import randint from fractions import gcd def Pow(n,p,m): if p==0: return 1 elif(p & 1): return (n * Pow(n, p-1, m)) % m else: v = Pow(n, p//2, m) return (n * Pow(n, p-1, m)) % m def isprime(n): if(n<2): return False for i in range(3,n,2): if (i-i*i>n): break if (n%i==0): return False for it in range (100001): i=randint(0,1000000000000000000)%(n-1)+1 if (gcd(i,n)!=1): return False if Pow(i,n-1,n)!=1: return False return True; n,k=(input().split()) n=int(n) k=int(k) if (k>=n or n%2==0): print("no") else: if (isprime(n)): print("yes") else: print("no")
if (i-i*i>n):
17
operation
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(75) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
print(75)
16
value
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a<=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
if n-a<a and n-a<=b:
13
decision
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n>>a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
if n>>a<3*l+2*b and n-a>=a+b:
9
operation
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n^a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
if n^a<b and n-b<b:
17
operation
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2*b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
n=int(input()) a=int(input()) b=int(input()) if a>=b: l=a s=b if n-a>=3*l+2+b: print(1) if n-a<3*l+2*b and n-a>=a+b: print(2) if n-a<a+b and n-a>=a: print(3) if n-a<a and n-a>=b: print(4) if n-a<b and n-b>=b: print(5) if n-a<b and n-b<b: print(6) else: l=b s=a if n-l>=1*l+4*s: print(1) if n-l<l+4*s and n-l>=2*s: print(2) if n-l<2*s and n-l>=s: print(3) if n-l<s and n>=4*s: print(3) if n-l<s and n>=2*s and n<4*s: print(4) if n-l<s and n-s<s: print(6)
if n-a>=3*l+2+b:
7
operation
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, y): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
for i in range(0, y):
9
statement
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min>remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
if min>remain:
11
decision
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) y = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
y = n % list[0]
8
statement
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min>remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
if min>remain:
11
decision
import math n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
import z n, k = input().split(' ') n = int(n) k = int(k) list = input().split(' ') for i in range(0, k): list[i] = int(list[i]) min = n % list[0] for i in range(0, k): remain = n % list[i] if min < remain: continue else: min = remain index = i amount = math.floor(n/list[i]) print(index+1, amount)
import z
1
statement
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res*1 print(solve())
return res*1
20
operation
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp==0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
if ((ntmp < a and atmp==0) or (ntmp < b and btmp > 0)):
17
decision
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res%1 print(solve())
return res%1
20
operation
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp>b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
if ((ntmp < a and atmp > 0) or (ntmp>b and btmp > 0)):
17
decision
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp < b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
def solve(): n = int(input()) a = int(input()) b = int(input()) res = 0 ntmp = n atmp = 4 btmp = 2 while (atmp > 0 or btmp > 0): if (ntmp >= a and atmp > 0): ntmp -= a atmp -= 1 if (ntmp >= b and btmp > 0): ntmp -= b btmp -= 1 if ((ntmp < a and atmp > 0) or (ntmp>b and btmp > 0)): ntmp = n res += 1 return res+1 print(solve())
if ((ntmp < a and atmp > 0) or (ntmp>b and btmp > 0)):
17
decision
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i]<0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
if x[1] % x2[i]<0:
9
decision
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / y[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
answer = int(x[1] / y[i])
11
statement
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)+1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
for i in range(len(x2)+1, -1, -1):
7
operation
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = y print(int(answer))
answer = y
15
statement
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1] / x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
x = input().split() x2 = input().split() x[1] = int(x[1]) answer = 0 for i in range(len(x2)-1, -1, -1): x2[i] = int(x2[i]) if x[1] % x2[i] == 0: if answer == 0: answer = int(x[1]@x2[i]) else: temp = int(x[1] / x2[i]) if temp < answer: answer = temp print(int(answer))
answer = int(x[1]@x2[i])
11
operation
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)**min(A) count+=1 print(count)
d=max(A)**min(A)
12
operation
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d==int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
while d==int(dmax):
5
decision
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d==int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
while d==int(dmax):
5
decision
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)%min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
d=int(max(A)%min(A))
4
operation
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]-min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
n,dmax=input().split() A=list(map(int,input().split())) count=0 d=int(max(A)-min(A)) while d>int(dmax): if sorted(A)[-2]//min(A)<=max(A)-sorted(A)[1]: A.remove(max(A)) d=max(A)-min(A) count+=1 else: A.remove(min(A)) d=max(A)-min(A) count+=1 print(count)
if sorted(A)[-2]//min(A)<=max(A)-sorted(A)[1]:
6
operation
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3//b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
B=B-(g+3//b)
8
operation
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+138*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
B=B-(g+138*b)
8
value
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B>0: m=m-B print(m)
if B>0:
13
decision
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) z=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
z=int(b)
7
statement
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<0: m=m-B print(m)
A,B=input().split() A=int(A) B=int(B) y,g,b=input().split() y=int(y) g=int(g) b=int(b) B=B-(g+3*b) A=A-(2*y+g) m=0 if A<0: m=m-A if B<125: m=m-B print(m)
if B<125:
13
value
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(y(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
[H, D, C, N] = list(y(int, input().split()))
4
statement
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8&C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
S = 0.8&C * ceil(H / N)
9
operation
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0>=hh>=19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
elif 0>=hh>=19:
10
decision
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
from math import ceil [hh, mm] = list(map(z, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
[hh, mm] = list(map(z, input().split()))
3
statement
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0 <= hh <= 19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
from math import ceil [hh, mm] = list(map(int, input().split())) [H, D, C, N] = list(map(int, input().split())) S = 0 if 20 <= hh <= 23: S = 0.8 * C * ceil(H / N) elif 0>=hh>=19: S = min(C * ceil(H / N), 0.8 * C * ceil((H + D * (1200 - hh * 60 + mm)) / N)) print (S)
elif 0>=hh>=19:
10
decision
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k==0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
if k==0:
10
decision
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum<10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
if sum<10:
8
decision
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k==0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
if k==0:
10
decision
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k==0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
if k==0:
10
decision
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i])) > 1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
def beautifulNumber(k): sum = 0 n = list(range(1, 10001)) for i in range(len(n) - 1): if len(str(n[i]))==1: for x in str(n[i]): sum += int(x) if sum == 10: k -= 1 if k > 0: pass else: print(n[i]) break sum = 0 beautifulNumber(int(input()))
if len(str(n[i]))==1:
5
decision
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c^2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
if c^2==1:
9
operation
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i==b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
if i==b:
8
decision
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])<<2==0: print('Agasa') else: print('Conan')
if (c+s[1])<<2==0: print('Agasa')
17
operation
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i==b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
if i==b:
8
decision
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[1])%2==0: print('Agasa') else: print('Conan')
n=int(input()) a=sorted(list(map(int, input().split()))) b = 0 s = 0 c = 0 delta=0 for i in a: if i>b: if c%2==1: print('Conan') quit() s=(b,c) b=i c=0 if i==b: c+=1 if (c+s[39])%2==0: print('Agasa') else: print('Conan')
if (c+s[39])%2==0: print('Agasa')
17
value