problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02814 | from math import gcd
n,m=map(int,input().split())
*a,=map(int,input().split())
g=a[0]
lcm=a[0]
for i in range(1,n):
g=gcd(lcm,a[i])
lcm*=a[i]
lcm//=g
for i in range(n):
if lcm//a[i]%2==0:
print(0)
exit(0)
print((m+lcm-1)//lcm) | from math import gcd
n,m=map(int,input().split())
*a,=map(int,input().split())
g=a[0]
lcm=a[0]
for i in range(1,n):
g=gcd(lcm,a[i])
lcm*=a[i]
lcm//=g
for i in range(n):
if lcm//a[i]%2==0:
print(0)
exit(0)
print((2*m//lcm+1)//2) | [
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"misc.opposites",
"identifier.replace.remove",
"literal.replace.add"
] | 616,848 | 616,849 | u860829879 | python |
p02814 | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 9 14:33:00 2020
@author: liang
"""
from math import gcd
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
flag = False
res = 1
for a in A:
a /= 2
res *= a//gcd(res,a)
if res > M:
flag = True
break
#print(res)
"""
存在チ... | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 9 14:33:00 2020
@author: liang
"""
from math import gcd
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
flag = False
res = 1
for a in A:
a //= 2
res *= a//gcd(res,a)
if res > M:
flag = True
break
#print(res)
"""
存在... | [
"expression.operator.change"
] | 616,867 | 616,868 | u628285938 | python |
p02814 | import queue
import numpy as np
import math
N, M = map(int, input().split())
a2 = list(map(int, input().split()))
a = []
for i in a2:
a.append(i//2)
lcm = a[0]
for i in a:
lcm *= i // math.gcd(lcm, i)
hasAns = True
for i in a:
if (lcm // i) % 2 ==0:
hasAns = False
break
ans = 0
if hasA... | import queue
import numpy as np
import math
N, M = map(int, input().split())
a2 = list(map(int, input().split()))
a = []
for i in a2:
a.append(i//2)
lcm = a[0]
for i in a:
lcm *= i // math.gcd(lcm, i)
hasAns = True
for i in a:
if (lcm // i) % 2 == 0:
hasAns = False
break
ans = 0
if has... | [
"expression.operation.binary.remove"
] | 616,869 | 616,870 | u784982404 | python |
p02814 | import math
n,m=map(int,input().split())
a=list(map(int,input().split()))
if n==1:
a1=a[0]//2
ans_m=m//a1
if ans_m==0:
print(0)
else:
print((ans_m-1)//2+1)
else:
x=a[0]
ch=0
ch1=0
while x%2==0:
x=x//2
ch+=1
dob=2**ch
for i in a:
if i%dob==0 and i%(dob*2)!=1:
ch1+=1
i... | import math
n,m=map(int,input().split())
a=list(map(int,input().split()))
if n==1:
a1=a[0]//2
ans_m=m//a1
if ans_m==0:
print(0)
else:
print((ans_m-1)//2+1)
else:
x=a[0]
ch=0
ch1=0
while x%2==0:
x=x//2
ch+=1
dob=2**ch
for i in a:
if i%dob==0 and i%(dob*2)!=0:
ch1+=1
i... | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 616,881 | 616,882 | u516554284 | python |
p02814 | from math import gcd
import sys
N, M = map(int, input().split())
A = list(map(int, input().split()))
lcm = 1
for a in A:
gcd_ = gcd(lcm, a//2)
lcm = lcm * (a // 2 // gcd_)
for a in A:
if lcm // (a // 2) % 2 == 1:
print(0)
sys.exit()
print(M // lcm - M // (2 * lcm))
| from math import gcd
import sys
N, M = map(int, input().split())
A = list(map(int, input().split()))
lcm = 1
for a in A:
gcd_ = gcd(lcm, a//2)
lcm = lcm * (a // 2 // gcd_)
for a in A:
if (lcm // (a // 2)) % 2 == 0:
print(0)
sys.exit()
print(M // lcm - M // (2 * lcm))
| [
"control_flow.branch.if.condition.change",
"literal.number.integer.change"
] | 616,885 | 616,886 | u874320250 | python |
p02814 | # -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from... | # -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from... | [
"literal.number.integer.change",
"function.return_value.change"
] | 616,893 | 616,894 | u334712262 | python |
p02814 | import sys
import math
from functools import reduce
def num_of_zeros(num):
return (num ^ (num - 1)).bit_length() - 1
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
def main():
input = sys.stdin.buffer.readline
n, m = map(int, i... | import sys
import math
from functools import reduce
def num_of_zeros(num):
return (num ^ (num - 1)).bit_length() - 1
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
def main():
input = sys.stdin.buffer.readline
n, m = map(int, i... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 616,903 | 616,904 | u331327289 | python |
p02814 | from math import gcd, ceil
def lcm(a, b):
return (a*b)//gcd(a, b)
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
a[i] = a[i]//2
lcm_v = a[0]
for i in range(1, n):
lcm_v = lcm(lcm_v, a[i])
ok = True
for aa in a:
if (lcm_v//aa) % 2 != 1:
ok = False
... | from math import gcd, ceil
def lcm(a, b):
return (a*b)//gcd(a, b)
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
a[i] = a[i]//2
lcm_v = a[0]
for i in range(1, n):
lcm_v = lcm(lcm_v, a[i])
ok = True
for aa in a:
if (lcm_v//aa) % 2 != 1:
ok = False
... | [
"assignment.add"
] | 616,908 | 616,909 | u970197315 | python |
p02814 | # ABC150 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from math import gcd
from math import ceil
def lcm(x, y):
return (x * y) // gcd(x, y)
n,m=nm()
a=nl()
ans=0
a=[x//2 for x in a]
lcm_v=a[0]
for i in range(n):
lcm_v=lcm(... | # ABC150 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from math import gcd
from math import ceil
def lcm(x, y):
return (x * y) // gcd(x, y)
n,m=nm()
a=nl()
ans=0
a=[x//2 for x in a]
lcm_v=a[0]
for i in range(n):
lcm_v=lcm(... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 616,910 | 616,911 | u970197315 | python |
p02814 | import math
from functools import reduce
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
def my_round(val, digit=0):
p = 10 ** digit
return (val * p * 2 + 1) // 2 / p
n, m... | import math
from functools import reduce
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
def my_round(val, digit=0):
p = 10 ** digit
return (val * p * 2 + 1) // 2 / p
n, m... | [
"identifier.change",
"control_flow.loop.condition.change"
] | 616,934 | 616,935 | u133347536 | python |
p02814 | from math import gcd
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [i // 2 for i in a]
l = 1
for a in A:
lcd *= a // gcd(lcd, a)
for a in A:
if lcd // a % 2 == 0:
print(0)
exit()
print((M//lcd+1)//2)
| from math import gcd
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [i // 2 for i in A]
lcd = 1
for a in A:
lcd *= a // gcd(lcd, a)
for a in A:
if lcd // a % 2 == 0:
print(0)
exit()
print((M//lcd+1)//2)
| [
"assignment.value.change",
"identifier.change",
"assignment.variable.change"
] | 616,936 | 616,937 | u698919163 | python |
p02814 | from functools import reduce
import math
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
n,m = map(int, input().split())
a = list(map(int, input().split()))
a = [i//2 for i in list(set(a))]
c... | from functools import reduce
import math
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
n,m = map(int, input().split())
a = list(map(int, input().split()))
a = [i//2 for i in list(set(a))]
no... | [
"assignment.add"
] | 616,950 | 616,951 | u521323621 | python |
p02814 | from math import gcd
from functools import reduce
def lcm_base(x, y):
return (x * y) // gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def evencount(n):
cnt=0
while n%2==0:
cnt+=1
n//=2
return cnt
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
... | from math import gcd
from functools import reduce
def lcm_base(x, y):
return (x * y) // gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def evencount(n):
cnt=0
while n%2==0:
cnt+=1
n//=2
return cnt
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
... | [
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 616,952 | 616,953 | u730769327 | python |
p02814 | import math
# least common multiple
def lcm(a,b):
f = math.gcd(a,b)
return a*b // f
N,m = list(map(int, input().split()))
A = list(map(int,input().split()))
l = A[0]
# a -> a`
for i in range(N):
if A[i]%2==1:
print(0)
exit(0)
A[i] //= 2
def F(x):
print(x)
res = 0
while x%2==0:
x //= 2
... | import math
# least common multiple
def lcm(a,b):
f = math.gcd(a,b)
return a*b // f
N,m = list(map(int, input().split()))
A = list(map(int,input().split()))
l = A[0]
# a -> a`
for i in range(N):
if A[i]%2==1:
print(0)
exit(0)
A[i] //= 2
def F(x):
res = 0
while x%2==0:
x //= 2
res += 1
... | [
"call.remove"
] | 616,956 | 616,957 | u723711163 | python |
p02814 | from math import gcd
n,m = map(int,input().split())
a = list(map(lambda x: int(x)//2,input().split()))
def lcm(x,y):
return x*y//gcd(x,y)
def f(x):
cnt = 0
while x%2 == 0:
x //= 2
cnt += 1
r = set([f(i) for i in a])
if len(r) != 1:
print(0)
exit()
T = 1
for i in range(n):
T = lcm... | from math import gcd
n,m = map(int,input().split())
a = list(map(lambda x: int(x)//2,input().split()))
def lcm(x,y):
return x*y//gcd(x,y)
def f(x):
cnt = 0
while x%2 == 0:
x //= 2
cnt += 1
return cnt
r = set([f(i) for i in a])
if len(r) != 1:
print(0)
exit()
T = 1
for i in range(... | [
"control_flow.return.add"
] | 617,019 | 617,020 | u703214333 | python |
p02814 | '''
https://atcoder.jp/contests/abc150/tasks/abc150_d
'''
def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000000)
from collections import Counter, deque
#from collections import defaultdict
from itertools import combinations, permutations, accumulate
#from itertools... | '''
https://atcoder.jp/contests/abc150/tasks/abc150_d
'''
def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000000)
from collections import Counter, deque
#from collections import defaultdict
from itertools import combinations, permutations, accumulate
#from itertools... | [
"control_flow.branch.if.condition.change",
"call.arguments.add"
] | 617,029 | 617,030 | u863442865 | python |
p02814 | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
from math import gcd
n, m = map(int, readline().split())
a = list(map(int, readline().split()))
for i in range(n):
a[i] //= 2
lcm_memo = 1
for i in range(n):
lcm_m... | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
from math import gcd
n, m = map(int, readline().split())
a = list(map(int, readline().split()))
for i in range(n):
a[i] //= 2
lcm_memo = 1
for i in range(n):
lcm_m... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 617,045 | 617,046 | u691018832 | python |
p02814 | import math
from functools import reduce
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
nm=list(map(int, input().split()))
a=list(map(int, input().split()))
n=nm[0]
m=nm[1]
b=0
c=a[0]
dnum=0
while c%2==0:
dnum+=1
c=c//2
for i in range(len(... | import math
from functools import reduce
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
nm=list(map(int, input().split()))
a=list(map(int, input().split()))
n=nm[0]
m=nm[1]
b=0
c=a[0]
dnum=0
while c%2==0:
dnum+=1
c=c//2
for i in range(len(... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change"
] | 617,052 | 617,053 | u927839462 | python |
p02814 | import copy
n,m = map(int,input().split())
a = set(list(map(int,input().split())))
a = list(a)
a_div2 = [0]*len(a)
a2 = copy.deepcopy(a)
for i in range(len(a)):
if a[i] % 2 == 1:
print(0)
exit()
for i in range(len(a)):
while a2[i] % 2 != 0:
a2[i] //= 2
a_div2[i] += 1
if len(set(a... | import copy
n,m = map(int,input().split())
a = set(list(map(int,input().split())))
a = list(a)
a_div2 = [0]*len(a)
a2 = copy.deepcopy(a)
for i in range(len(a)):
if a[i] % 2 == 1:
print(0)
exit()
for i in range(len(a)):
while a2[i] % 2 == 0:
a2[i] //= 2
a_div2[i] += 1
if len(set(a... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 617,064 | 617,065 | u599114793 | python |
p02814 | import copy
n,m = map(int,input().split())
a = set(list(map(int,input().split())))
a = list(a)
a_div2 = [0]*n
a2 = copy.deepcopy(a)
for i in range(len(a)):
if a[i] % 2 == 1:
print(0)
exit()
for i in range(len(a)):
while a2[i] % 2 != 0:
a2[i] //= 2
a_div2[i] += 1
if len(set(a_div2... | import copy
n,m = map(int,input().split())
a = set(list(map(int,input().split())))
a = list(a)
a_div2 = [0]*len(a)
a2 = copy.deepcopy(a)
for i in range(len(a)):
if a[i] % 2 == 1:
print(0)
exit()
for i in range(len(a)):
while a2[i] % 2 == 0:
a2[i] //= 2
a_div2[i] += 1
if len(set(a... | [
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.add",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 617,066 | 617,065 | u599114793 | python |
p02814 | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
n, m = map(int, input().split())
v = list(map(int, input().split()))
num = 0
# print(v[0])
while (v[0] % 2 == 0):
v[0] //= 2
num += 1
# print(v[0])
ans = v[0]
for i in range(n - 1):
if (v[i + 1] % (2 ** num) != 0 or v[i + 1] % (2 ** (num + ... | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
n, m = map(int, input().split())
v = list(map(int, input().split()))
num = 0
# print(v[0])
while (v[0] % 2 == 0):
v[0] //= 2
num += 1
# print(v[0])
ans = v[0]
for i in range(n - 1):
if (v[i + 1] % (2 ** num) != 0 or v[i + 1] % (2 ** (num + ... | [
"call.remove"
] | 617,071 | 617,072 | u174404613 | python |
p02814 | from functools import reduce
from math import gcd
from math import ceil
N, M = map(int, input().split())
A = list(map(int, input().split()))
def lcm(a, b):
return a * b / gcd(a, b)
def bit(a):
res = 0
_a = a
while _a % 2 == 0:
_a /= 2
res += 1
return res
count = bit(A[0])
for i i... | from functools import reduce
from math import gcd
from math import ceil
N, M = map(int, input().split())
A = list(map(int, input().split()))
def lcm(a, b):
return a * b // gcd(a, b)
def bit(a):
res = 0
_a = a
while _a % 2 == 0:
_a /= 2
res += 1
return res
count = bit(A[0])
for i ... | [
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 617,108 | 617,109 | u538632589 | python |
p02814 | #150_D
from math import gcd
from functools import reduce
def lcm(x, y):
return x * y // gcd(x, y)
n, m = map(int, input().split())
a = list(map(int, input().split()))
flg = False
cnt0 = 0
while a[0] % 2 == 0:
a[0] //= 2
cnt0 += 1
for i in range(1, n):
cnti = 0
while a[i] % 2 == 0:
a[i] //= ... | #150_D
from math import gcd
from functools import reduce
def lcm(x, y):
return x * y // gcd(x, y)
n, m = map(int, input().split())
a = list(map(int, input().split()))
flg = True
cnt0 = 0
while a[0] % 2 == 0:
a[0] //= 2
cnt0 += 1
for i in range(1, n):
cnti = 0
while a[i] % 2 == 0:
a[i] //= 2... | [
"misc.opposites",
"assignment.value.change"
] | 617,120 | 617,121 | u139112865 | python |
p02814 | from math import gcd
import sys
input = sys.stdin.readline
N,M=map(int,input().split())
List=list(map(lambda x:int(x)/2,map(int, set(input().split()))))
def main():
LCM=1
for i in List:
LCM*=i/gcd(LCM,i)
for i in List:
if LCM/i%2==0:
print(0)
exit()
print(int... | from math import gcd
import sys
input = sys.stdin.readline
N,M=map(int,input().split())
List=list(map(lambda x:int(x)//2,map(int, set(input().split()))))
def main():
LCM=1
for i in List:
LCM*=i//gcd(LCM,i)
for i in List:
if LCM//i%2==0:
print(0)
exit()
print(... | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 617,140 | 617,141 | u093861603 | python |
p02814 | import math
import functools
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
def multiple(a, b):
return a*b // math.gcd(a, b)
def lcm(nums):
return functools.reduce(multiple, nums)
lcm = lcm(A)
hlcm = lcm//2
print(lcm, hlcm)
for a in A:
if a % 2 == 1:
print(0)
e... | import math
import functools
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
def multiple(a, b):
return a*b // math.gcd(a, b)
def lcm(nums):
return functools.reduce(multiple, nums)
lcm = lcm(A)
hlcm = lcm//2
# print(lcm, hlcm)
for a in A:
if a % 2 == 1:
print(0)
... | [
"call.remove"
] | 617,150 | 617,151 | u223646582 | python |
p02814 | import math
import functools
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
def multiple(a, b):
return a*b // math.gcd(a, b)
def lcm(nums):
return functools.reduce(multiple, nums)
lcm = lcm(A)
hlcm = lcm//2
# print(lcm, hlcm)
for a in A:
if a % 2 == 1:
print(0)
... | import math
import functools
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
def multiple(a, b):
return a*b // math.gcd(a, b)
def lcm(nums):
return functools.reduce(multiple, nums)
lcm = lcm(A)
hlcm = lcm//2
# print(lcm, hlcm)
for a in A:
if a % 2 == 1:
print(0)
... | [
"call.arguments.change",
"expression.operation.binary.remove"
] | 617,152 | 617,151 | u223646582 | python |
p02814 | import math
from functools import reduce
N,M= map(int,input().split())
A=[int(x) for x in input().split()]
def lcmpair(a,b):
return (a*b)// math.gcd(a,b)
def lcm(List):
return reduce(lcmpair,List,1)
lcmB = lcm(A) //2
crit = 0
pena = 0
num = A[0]
while num%2 != 0:
crit +=1
num = num//2
count = 0
for i i... | import math
from functools import reduce
N,M= map(int,input().split())
A=[int(x) for x in input().split()]
def lcmpair(a,b):
return (a*b)// math.gcd(a,b)
def lcm(List):
return reduce(lcmpair,List,1)
lcmB = lcm(A) //2
crit = 0
pena = 0
num = A[0]
while num%2 == 0:
crit +=1
num = num//2
count = 0
for i i... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 617,155 | 617,156 | u269235541 | python |
p02814 | import math, string, itertools, heapq, collections, re, array, bisect, sys, copy, functools
import time,random
sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return lis... | import math, string, itertools, heapq, collections, re, array, bisect, sys, copy, functools
import time,random
sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return lis... | [] | 617,164 | 617,165 | u637175065 | python |
p02814 | from math import gcd
from functools import reduce
def read_int_n():
return list(map(int, input().split()))
def read_float_n():
return list(map(float, input().split()))
NM=read_int_n()
A=read_float_n()
A=list(set(A)) ##重複した要素を削除し、新たなリストを生成
##2で何回割れるかをcountする
def power2(n): ##参考:https://note.nkmk.me/python-pr... | from math import gcd
from functools import reduce
def read_int_n():
return list(map(int, input().split()))
def read_float_n():
return list(map(float, input().split()))
NM=read_int_n()
A=read_float_n()
A=list(set(A)) ##重複した要素を削除し、新たなリストを生成
##2で何回割れるかをcountする
def power2(n): ##参考:https://note.nkmk.me/python-pr... | [
"call.arguments.add",
"call.arguments.change"
] | 617,168 | 617,169 | u788023488 | python |
p02814 | n, m = map(int, input().split())
l = list(map(int, input().split()))
import math
from functools import reduce
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
#print(lcm_list(l))
x = lcm_list(l)
for i in range(n):
if x%l[i] == 0:
print(0)
... | n, m = map(int, input().split())
l = list(map(int, input().split()))
import math
from functools import reduce
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
#print(lcm_list(l))
x = lcm_list(l)
for i in range(n):
if (x//l[i])%2 == 0:
print(... | [
"control_flow.branch.if.condition.change",
"expression.operator.arithmetic.change",
"control_flow.loop.for.condition.change"
] | 617,198 | 617,199 | u186838327 | python |
p02814 | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (_a if not _a % c or _a // c % 2 else 2 * m + 2 for _a in a))
return str((m - l // 2) // l + 1) i... | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (_a if not _a % c and _a // c % 2 else 2 * m + 2 for _a in a))
return str((m - l // 2) // l + 1) ... | [
"assignment.value.change",
"call.arguments.change"
] | 617,203 | 617,204 | u046187684 | python |
p02814 | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (0 if _a % c or not _a // c % 2 else _a for _a in a))
return str((m - l // 2) // l + 1) if l else... | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b) if a * b else 0
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (0 if _a % c or not _a // c % 2 else _a for _a in a))
return str((m - l // 2) // ... | [] | 617,205 | 617,206 | u046187684 | python |
p02814 | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (2 * m if _a % c or not _a // c % 2 else _a for _a in a))
return str(max((m - l // 2) // l + 1, 0... | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (2 * m + 2 if _a % c or not _a // c % 2 else _a for _a in a))
return str(max((m - l // 2) // l + ... | [
"assignment.change"
] | 617,207 | 617,208 | u046187684 | python |
p02814 | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (2 * m if _a % c or not _a // c % 2 else _a for _a in a))
return str(max((m - l // 2) // l + 1, 0... | from math import gcd
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
def solve(string):
n, m, *a = map(int, string.split())
c = 2**len(bin(a[0]).split("1")[-1])
l = reduce(lcm, (2 * m + 2 if _a % c or not _a // c % 2 else _a for _a in a))
return str(max((m + l // 2) // l, 0... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"function.return_value.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 617,207 | 617,210 | u046187684 | python |
p02814 | import mat
import functools
def lcm(n1, n2):
return n1 * n2 // math.gcd(n1, n2)
N, M = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
A[i] //= 2
lcmA = functools.reduce(lcm, A)
gcdA = functools.reduce(math.gcd, A)
if (lcmA // gcdA) % 2 == 0:
print(0)
else:
print((M /... | import math
import functools
def lcm(n1, n2):
return n1 * n2 // math.gcd(n1, n2)
N, M = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
A[i] //= 2
lcmA = functools.reduce(lcm, A)
gcdA = functools.reduce(math.gcd, A)
if (lcmA // gcdA) % 2 == 0:
print(0)
else:
print((M ... | [
"identifier.change"
] | 617,225 | 617,226 | u673361376 | python |
p02814 | import math
from functools import reduce
def main():
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i,aa in enumerate(a):
j = 0
while aa % 2 == 0:
aa //= 2
j+=1
if i == 0:
modtmp = j
else:
if modtemp != j:
... | import math
from functools import reduce
def main():
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i,aa in enumerate(a):
j = 0
while aa % 2 == 0:
aa //= 2
j+=1
if i == 0:
modtmp = j
else:
if modtmp != ... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 617,231 | 617,232 | u321035578 | python |
p02814 | import sys
input = sys.stdin.readline
N,M=map(int,input().split())
A=list(map(int,input().split()))
def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(x, y):
return (x * y) // gcd(x, y)
def count2(x):
c=0
while x%2==0:
x//=2
return c
c2=count2(A[0])
LCM=1
for a in A:
... | import sys
input = sys.stdin.readline
N,M=map(int,input().split())
A=list(map(int,input().split()))
def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(x, y):
return (x * y) // gcd(x, y)
def count2(x):
c=0
while x%2==0:
x//=2
c+=1
return c
c2=count2(A[0])
LCM=1
... | [] | 617,239 | 617,240 | u695811449 | python |
p02814 | N,M = map(int, input().split())
a_n = list(map(int, input().split()))
g = a_n.copy()
while not any(x%2 for x in g): g = [x//2 for x in g]
if not all(x%2 for x in g): print(0); exit(0)
def gcd(a,b):
while b: a,b = b,a%b
return a
lcm = lambda a,b: a*b//gcd(a,b)
tot = 1
for x in l: tot = lcm(tot,x//2)
print((m//tot+1... | N,M = map(int, input().split())
a_n = list(map(int, input().split()))
g = a_n.copy()
while not any(x%2 for x in g): g = [x//2 for x in g]
if not all(x%2 for x in g): print(0); exit(0)
def gcd(a,b):
while b: a,b = b,a%b
return a
lcm = lambda a,b: a*b//gcd(a,b)
tot = 1
for x in a_n: tot = lcm(tot,x//2)
print((M//to... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 617,241 | 617,242 | u018990794 | python |
p02814 | #ABC150_D
from math import gcd
N,M=map(int,input().split())
A=list(map(int,input().split()))
lcm=a[0]//2
for x in A:
x//=2
g=gcd(lcm,x)
if (lcm//g)%2!=(x//g)%2:
print(0)
exit()
lcm=lcm*x//g
print((M//lcm+1)//2) | #ABC150_D
from math import gcd
N,M=map(int,input().split())
A=list(map(int,input().split()))
lcm=A[0]//2
for x in A:
x//=2
g=gcd(lcm,x)
if (lcm//g)%2!=(x//g)%2:
print(0)
exit()
lcm=lcm*x//g
print((M//lcm+1)//2) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 617,281 | 617,282 | u842964692 | python |
p02814 | N,M=map(int,input().split())
a=[int(x)//2 for x in input().split()]
def lcm(a,b):
if a>b:
a,b=b,a
if a==1:
return b
n=a*b
while a!=0:
b,a=a,b%a
return n//b
f1,f2=a[0],a[0]
for i in range(1,N-1):
f1|=a[i]
f2&=a[i]
c=0
while f1&1==0:
f1//=2
c+=1
if f2&2**c==0:
print(0)
exit()
t=a[0]
... | N,M=map(int,input().split())
a=[int(x)//2 for x in input().split()]
def lcm(a,b):
if a>b:
a,b=b,a
if a==1:
return b
n=a*b
while a!=0:
b,a=a,b%a
return n//b
f1,f2=a[0],a[0]
for i in range(1,N):
f1|=a[i]
f2&=a[i]
c=0
while f1&1==0:
f1//=2
c+=1
if f2&2**c==0:
print(0)
exit()
t=a[0]
fo... | [
"expression.operation.binary.remove"
] | 617,291 | 617,292 | u692746605 | python |
p02814 | import sys
def f(x):
cnt = 0
while x%2 == 0:
x /= 2
cnt += 1
return cnt
def gcd(x, y):
if y:
return gcd(y, x%y)
else:
return x
def lcm(x, y):
return (x * y) // gcd(x, y)
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [i//2 for i in a]
t = f(a[0])
for i in rang... | import sys
def f(x):
cnt = 0
while x%2 == 0:
x /= 2
cnt += 1
return cnt
def gcd(x, y):
if y:
return gcd(y, x%y)
else:
return x
def lcm(x, y):
return (x * y) // gcd(x, y)
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [i//2 for i in a]
t = f(a[0])
for i in rang... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change"
] | 617,303 | 617,304 | u278142467 | python |
p02814 | from math import gcd
import sys
input = sys.stdin.readline
def main():
N, M = map(int, input().split())
A = list(map(lambda x: int(x) // 2, input().split()))
X = A[0]
for i in range(1, N):
a, b = X, A[i]
X = a * b // gcd(a, b)
if X > M:
print(0)
exit(0)... | from math import gcd
import sys
input = sys.stdin.readline
def main():
N, M = map(int, input().split())
A = list(map(lambda x: int(x) // 2, input().split()))
X = A[0]
for i in range(1, N):
a, b = X, A[i]
X = a * b // gcd(a, b)
if X > M:
print(0)
exit(0)... | [
"assignment.value.change",
"expression.operation.unary.remove",
"literal.number.integer.change",
"control_flow.loop.condition.change"
] | 617,313 | 617,314 | u380772254 | python |
p02814 | N, M = map(int, input().split())
A = list(map(int, input().split()))
half = [i//2 for i in A]
def f(v):
r = 0
while v % 2 == 0:
v /= 2
r += 1
return r
from math import gcd
def f2(x, y):
return (x * y) // gcd(x, y)
d = f(A[0])
for ai in A:
if d != f(ai):
print(0)
b... | N, M = map(int, input().split())
A = list(map(int, input().split()))
half = [i//2 for i in A]
def f(v):
r = 0
while v % 2 == 0:
v /= 2
r += 1
return r
from math import gcd
def f2(x, y):
return (x * y) // gcd(x, y)
d = f(A[0])
for ai in A:
if d != f(ai):
print(0)
b... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 617,354 | 617,355 | u002459665 | python |
p02814 | import math
n,m = map(int,input().split())
l = list(map(int,input().split()))
count = 0
while True:
if l[0] % 2 == 0:
l[0] //= 2
count += 1
else:
break
for i in range(1,n):
l[i] //= 2**count
if l[i] % 1 != 0 or l[i] % 2 == 0:
print(0)
exit()
ans = l[0]
for ... | import math
n,m = map(int,input().split())
l = list(map(int,input().split()))
count = 0
while True:
if l[0] % 2 == 0:
l[0] //= 2
count += 1
else:
break
for i in range(1,n):
l[i] //= 2**count
if l[i] % 1 != 0 or l[i] % 2 == 0:
print(0)
exit()
ans = l[0]
for ... | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 617,362 | 617,363 | u368796742 | python |
p02814 | from math import gcd
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
def lcm(values):
ans = values[0]
for i in range(1, len(values)):
ans = ans * values[i] // gcd(ans, values[i])
return ans
def count_div2(value):
count = 0
while value % 2 == 0:
count += 1... | from math import gcd
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
def lcm(values):
ans = values[0]
for i in range(1, len(values)):
ans = ans * values[i] // gcd(ans, values[i])
return ans
def count_div2(value):
count = 0
while value % 2 == 0:
count += 1... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 617,372 | 617,373 | u956937655 | python |
p02814 | import math
n,m = map(int,input().split())
A=list(map(int,input().split()))
def lcm(x, y):
return (x * y) // math.gcd(x, y)
def chk(i):
cnt=0
while True:
if i%2==0:
i/=2
cnt+=1
else:
break
return cnt
flag=0
number=chk(A[0])
for i in A:
if chk(i... | import math
n,m = map(int,input().split())
A=list(map(int,input().split()))
def lcm(x, y):
return (x * y) // math.gcd(x, y)
def chk(i):
cnt=0
while True:
if i%2==0:
i/=2
cnt+=1
else:
break
return cnt
flag=0
number=chk(A[0])
for i in A:
if chk(i... | [
"assignment.change"
] | 617,377 | 617,378 | u916637712 | python |
p02814 | def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(a, b):
return a * b // gcd(a, b)
def div2(x):
c = 0
while x%2==0:
x //= 2
c+=1
return c
def test():
N, M = map(int, input().split())
a = list(map(int, input().split()))
for i in range(N):
if a... | def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(a, b):
return a * b // gcd(a, b)
def div2(x):
c = 0
while x%2==0:
x //= 2
c+=1
return c
def test():
N, M = map(int, input().split())
a = list(map(int, input().split()))
for i in range(N):
if a... | [
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change",
"call.arguments.change"
] | 617,426 | 617,425 | u637170240 | python |
p02814 | N, M = map(int, input().split())
A = list(map(int, input().split()))
from math import gcd
from functools import reduce
A = [x >> 1 for x in A]
def merge(a, b):
g = gcd(a, b)
a //= g
b //= g
if a % 2 == 0:
return 0
if b % 2 == 0:
return 0
n = a * b * g
if n > 10 ** 9:
... | N, M = map(int, input().split())
A = list(map(int, input().split()))
from math import gcd
from functools import reduce
A = [x >> 1 for x in A]
def merge(a, b):
g = gcd(a, b)
a //= g
b //= g
if a % 2 == 0:
return 0
if b % 2 == 0:
return 0
n = a * b * g
if n > 10 ** 9:
... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 617,432 | 617,433 | u554954744 | python |
p02814 | import sys
from math import gcd
def cnt(x):
a = 0
while True:
r = x % 2
if r == 1:
break
else:
a += 1
x //= 2
read = sys.stdin.read
N, M, *a = map(int, read().split())
a = list(set(a))
b = [cnt(i) for i in a]
if len(set(b)) != 1:
print(0)
e... | import sys
from math import gcd
def cnt(x):
a = 0
while True:
r = x % 2
if r == 1:
break
else:
a += 1
x //= 2
return a
read = sys.stdin.read
N, M, *a = map(int, read().split())
a = list(set(a))
b = [cnt(i) for i in a]
if len(set(b)) != 1:
p... | [
"control_flow.return.add"
] | 617,438 | 617,439 | u945181840 | python |
p02814 | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
# 2で割れる回数を数える
def f(x):
t = 0
while (x % 2 == 0):
x //= 2
t += 1
return t
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
a[i] //= 2
cnt = f(a[0])
for i in range(n):
# 割れる回数... | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
# 2で割れる回数を数える
def f(x):
t = 0
while (x % 2 == 0):
x //= 2
t += 1
return t
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
a[i] //= 2
cnt = f(a[0])
for i in range(n):
# 割れる回数... | [
"assignment.compound.bitwise.replace.add",
"expression.operator.bitwise.replace.remove",
"expression.operation.binary.change"
] | 617,448 | 617,449 | u305366205 | python |
p02814 | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
# 2で割れる回数を数える
def f(x):
t = 0
while (x % 2 == 0):
x //= 2
t += 1
return t
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
a[i] //= 2
cnt = f(a[0])
for i in range(n):
# 割れる回数... | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
# 2で割れる回数を数える
def f(x):
t = 0
while (x % 2 == 0):
x //= 2
t += 1
return t
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
a[i] //= 2
cnt = f(a[0])
for i in range(n):
# 割れる回数... | [] | 617,450 | 617,449 | u305366205 | python |
p02814 | from math import gcd
from math import ceil
n,m=map(int,input().split())
a=list(map(int,input().split()))
c=len(bin(a[0]))-bin(a[0]).rfind("1")
for i in range(1,n):
if c!=len(bin(a[i+1]))-bin(a[i+1]).rfind("1"):
print(0)
exit()
g=a[0]
for i in range(n-1):
g=(g//gcd(g,a[i+1]))*(a[i+1]//gcd(g,a[i+1]))*gcd(g,a... | from math import gcd
from math import ceil
n,m=map(int,input().split())
a=list(map(int,input().split()))
c=len(bin(a[0]))-bin(a[0]).rfind("1")
for i in range(1,n):
if c!=len(bin(a[i]))-bin(a[i]).rfind("1"):
print(0)
exit()
g=a[0]
for i in range(n-1):
g=(g//gcd(g,a[i+1]))*(a[i+1]//gcd(g,a[i+1]))*gcd(g,a[i+1... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 617,467 | 617,468 | u169138653 | python |
p02814 | import math
n,m = map(int,input().split())
a = list(map(int, input().split()))
s = set(a)
c = set()
l = 1
k = (a[0] // 2) % 2
for i in a:
l = l * i // math.gcd(l,i)
if l // 2 > m:
ans = 0
break
count = 0
while True:
if (i>>count) % 2 == 0:
count += 1
else:
... | import math
n,m = map(int,input().split())
a = list(map(int, input().split()))
s = set(a)
c = set()
l = 1
k = (a[0] // 2) % 2
for i in a:
l = l * i // math.gcd(l,i)
if l // 2 > m:
ans = 0
break
count = 0
while True:
if (i>>count) % 2 == 0:
count += 1
else:
... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 617,476 | 617,477 | u204842730 | python |
p02814 | from math import gcd
from functools import reduce
def lcm(x, y):
res = (x * y) // gcd(x, y)
if 10 ** 9 < res:
res = 0
return res
def solve():
N, M, *a = map(int, open(0).read().split())
half_a = [ai // 2 for ai in a]
half_lcm = reduce(lcm, half_a)
for ai in a:
i... | from math import gcd
from functools import reduce
def lcm(x, y):
res = (x * y) // gcd(x, y)
if 10 ** 9 < res:
res = 0
return res
def solve():
N, M, *a = map(int, open(0).read().split())
half_a = [ai // 2 for ai in a]
half_lcm = reduce(lcm, half_a)
for ai in half_a:
... | [
"identifier.change"
] | 617,507 | 617,508 | u935984175 | python |
p02814 | def gcd(a,b):
while b:
a,b=b,a%b
return a
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
a[i]//=2
x=a[0]
for j in range(30):
if x%2==0:
x//=2
else:
p=j
for i in range(1,n):
x=a[i]
for j in range(30):
if x%2==0:
x//... | def gcd(a,b):
while b:
a,b=b,a%b
return a
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
a[i]//=2
x=a[0]
for j in range(30):
if x%2==0:
x//=2
else:
p=j
break
for i in range(1,n):
x=a[i]
for j in range(30):
if x%2==0:
... | [
"control_flow.break.add"
] | 617,509 | 617,510 | u225388820 | python |
p02814 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import pdb
import sys
import functions
F = sys.stdin
N, M = list(map(int,F.readline().rstrip().split()))
a_list = list(map(int,F.readline().rstrip().split()))
num = 1
while a_list[0] % 2**(num + 1) == 0:
num += 1
def lcm(a, b):
return (a * b) // functions.gcd(a,... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import pdb
import sys
import math
F = sys.stdin
N, M = list(map(int,F.readline().rstrip().split()))
a_list = list(map(int,F.readline().rstrip().split()))
num = 1
while a_list[0] % 2**(num + 1) == 0:
num += 1
def lcm(a, b):
return (a * b) // math.gcd(a, b)
lcm_b... | [
"identifier.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 617,524 | 617,525 | u637413735 | python |
p02814 | n,m=map(int,input().split())
a = [int(x)//2 for x in input().split()]
import math
lmc=a[0]
for i in range(1,n):
lmc=lmc*a[i]//math.gcd(lmc,a[i])
if lmc>m:
print("0")
exit()
for i in range(n):
if (lmc//a[i])%2==0:
print("0")
exit()
if (m//lmc)%2==0:
print((m//lmc)%2)
else:
... | n,m=map(int,input().split())
a = [int(x)//2 for x in input().split()]
import math
lmc=a[0]
for i in range(1,n):
lmc=lmc*a[i]//math.gcd(lmc,a[i])
if lmc>m:
print("0")
exit()
for i in range(n):
if (lmc//a[i])%2==0:
print("0")
exit()
if (m//lmc)%2==0:
print((m//lmc)//2)
else:
... | [
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 617,533 | 617,534 | u747220349 | python |
p02814 | import math
N,M=map(int, input().split())
A = [int(a) for a in input().split()]
A2 = [a>>1 for a in A]
lcm = A2[0]
for i in range(1, N):
lcm = lcm * A2[i] // math.gcd(lcm, A2[i])
if lcm>M:
print(0)
exit()
B = sum([1 for a in A if lcm%a==0])
if B>0:
print(0)
else:
print((M//lcm+1)//2) | import sys
import math
N,M=map(int, input().split())
A = [int(a) for a in input().split()]
A2 = [a>>1 for a in A]
lcm = A2[0]
for i in range(1, N):
lcm = lcm * A2[i] // math.gcd(lcm, A2[i])
if lcm>M:
print(0)
sys.exit()
B = sum([1 for a in A if lcm%a==0])
if B>0:
print(0)
else:
pri... | [] | 617,634 | 617,635 | u425061801 | python |
p02814 | import math
def lcm(x, y):
return x * y // math.gcd(x, y)
N, M = [int(x) for x in input().split()]
l = [int(x) // 2 for x in input().split()]
ans = l[0]
for i in reversed(range(30)):
if ans % 2 ** i == 0:
numof2 = 2 ** i
for i in range(1, N):
if l[i] % numof2 == 0 and (l[i] // numof2) % 2 == 1:
ans = l... | import math
def lcm(x, y):
return x * y // math.gcd(x, y)
N, M = [int(x) for x in input().split()]
l = [int(x) // 2 for x in input().split()]
ans = l[0]
for i in reversed(range(30)):
if ans % 2 ** i == 0:
numof2 = 2 ** i
break
for i in range(1, N):
if l[i] % numof2 == 0 and (l[i] // numof2) % 2 == 1:
... | [
"control_flow.break.add"
] | 617,655 | 617,656 | u930574673 | python |
p02814 | import math
n,m = map(int, input().split( ))
a = list(map(int, input().split( )))
for i in range(n):
a[i]//=2
pow2 = 2**50
p2 = set()
for i in range(n):
tmp = math.gcd(pow2,a[i])
p2.add(tmp)
if len(set())>1:
print(0)
exit()
def lcd(x,y):
tmp = math.gcd(x,y)
x//=tmp
y//=t... | import math
n,m = map(int, input().split( ))
a = list(map(int, input().split( )))
for i in range(n):
a[i]//=2
pow2 = 2**50 #10**9 <= 2**30
p2 = set()
for i in range(n):
tmp = math.gcd(pow2,a[i])
p2.add(tmp)
if len(p2)>1:###
print(0)
exit()
def lcd(x,y):
tmp = math.gcd(x,y)
x/... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.arguments.change"
] | 617,678 | 617,679 | u520276780 | python |
p02814 | import sys
def input():
return sys.stdin.readline()[:-1]
from math import gcd
n, m = map(int, input().split())
a = list(map(int, input().split()))
m *= 2
if n == 1:
print((m//a[0]+1)//2)
else:
lcm = a[0]*a[1]//gcd(a[0], a[1])
for i in range(2, n):
lcm = lcm * a[i] // gcd(lcm, a[i])
if lcm > x:
print(0)
... | import sys
def input():
return sys.stdin.readline()[:-1]
from math import gcd
n, m = map(int, input().split())
a = list(map(int, input().split()))
m *= 2
if n == 1:
print((m//a[0]+1)//2)
else:
lcm = a[0]*a[1]//gcd(a[0], a[1])
for i in range(2, n):
lcm = lcm * a[i] // gcd(lcm, a[i])
if lcm > m:
print(0)
... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 617,706 | 617,707 | u218843509 | python |
p02814 | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from math import gcd
from functools import reduce
N,M,*A = map(int,read().split())
# 「奇数倍」に帰着
A = [x >> 1 for x in A]
def merge(a,b):
g = gcd(a,b)
a //= g; b //= g
if a % 2 == 0:
r... | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from math import gcd
from functools import reduce
N,M,*A = map(int,read().split())
# 「奇数倍」に帰着
A = [x >> 1 for x in A]
def merge(a,b):
g = gcd(a,b)
a //= g; b //= g
if a % 2 == 0:
r... | [
"assignment.change"
] | 617,714 | 617,715 | u102461423 | python |
p02815 | import sys
input = sys.stdin.readline
n = int(input())
mod = 10**9+7
a = list(map(int,input().split()))
a.sort()
ans = 0
const = pow(2,n,mod)
if n == 1:
print(a[0]*3)
exit()
for i in range(n):
ans = (ans + a[i]*const*(pow(2,n-1,mod)+pow(2,n-2,mod)*(n-i-1))%mod)%mod
print(ans) | import sys
input = sys.stdin.readline
n = int(input())
mod = 10**9+7
a = list(map(int,input().split()))
a.sort()
ans = 0
const = pow(2,n,mod)
if n == 1:
print(a[0]*2%mod)
exit()
for i in range(n):
ans = (ans + a[i]*const*(pow(2,n-1,mod)+pow(2,n-2,mod)*(n-i-1))%mod)%mod
print(ans) | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 617,748 | 617,749 | u905582793 | python |
p02815 | n=int(input())
c=list(map(int,input().split()))
c.sort(reverse=True)
res=0
ans=0
mod=10**9+7
p=pow(2,n*2-2,mod)
for i in range(n):
ans+=(c[i]*(i+2)%mod)*p
prit(ans) | n=int(input())
c=list(map(int,input().split()))
c.sort(reverse=True)
res=0
ans=0
mod=10**9+7
p=pow(2,n*2-2,mod)
for i in range(n):
ans+=(c[i]*(i+2)%mod)*p
print(ans%mod)
| [
"identifier.change",
"call.function.change"
] | 617,754 | 617,755 | u747220349 | python |
p02815 | #!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for... | #!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for... | [
"expression.operation.binary.remove"
] | 617,870 | 617,871 | u585482323 | python |
p02815 | import sys,collections as cl,bisect as bs,math
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
return list(map(int,input().split()))
def m(): #複数文字
return map(int,input().split())
def onem(): #Nとかの取得
return int(input())
def s(x): #圧縮
a = []
... | import sys,collections as cl,bisect as bs,math
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
return list(map(int,input().split()))
def m(): #複数文字
return map(int,input().split())
def onem(): #Nとかの取得
return int(input())
def s(x): #圧縮
a = []
... | [
"call.remove"
] | 617,880 | 617,881 | u807772568 | python |
p02815 | import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
mod = 10 ** 9 + 7
res = 0
if N == 1:
print(a[0] * 2)
exit(0)
for i in range(N):
res += a[i] * (pow(2, N - 1, mod) % mod + pow(2, N - 2, mod) * i % mod) % mod
res %= mod
print(res * pow(2, N, mod) % ... | import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
mod = 10 ** 9 + 7
res = 0
if N == 1:
print(a[0] * 2 % mod)
exit(0)
for i in range(N):
res += a[i] * (pow(2, N - 1, mod) % mod + pow(2, N - 2, mod) * i % mod) % mod
res %= mod
print(res * pow(2, N, m... | [
"expression.operation.binary.add"
] | 617,890 | 617,891 | u141610915 | python |
p02815 | n = int(input())
c = sorted(list(map(int, input().split())))
p = 10**9+7
print(sum([(i+2) * c[i] for i in range(n)]) * pow(4, n-1, p) % p) | n = int(input())
c = sorted(list(map(int, input().split())), reverse=True)
p = 10**9+7
print(sum([(i+2) * c[i] for i in range(n)]) * pow(4, n-1, p) % p) | [
"call.arguments.add"
] | 617,900 | 617,901 | u652057333 | python |
p02815 | n = int(input())
c = sorted(list(map(int, input().split())),reverse=True)
mod = 10**9 + 7
ans = 0
two = [1]
for i in range(n*2):
two += [(two[i]*2) % mod]
for i in range(n):
ans += (i+1) * c[i]
ans %= mod
ans *= two[2*n - 2]
print(ans%mod) | n = int(input())
c = sorted(list(map(int, input().split())),reverse=True)
mod = 10**9 + 7
ans = 0
two = [1]
for i in range(n*2):
two += [(two[i]*2) % mod]
for i in range(n):
ans += (i+2) * c[i]
ans %= mod
ans *= two[2*n - 2]
print(ans%mod) | [
"literal.number.integer.change",
"expression.operation.binary.change"
] | 617,929 | 617,930 | u934868410 | python |
p02815 | n=int(input())
mod=10**9+7
c=list(map(int,input().split()))
c.sort()
ans=0
for i in range(n):
ans+=c[i]*(n-i+2)
ans%=mod
print(ans*pow(4,n-1,mod)%mod)
| n=int(input())
mod=10**9+7
c=list(map(int,input().split()))
c.sort()
ans=0
for i in range(n):
ans+=c[i]*(n-i+1)
ans%=mod
print((ans*pow(4,n-1,mod))%mod)
| [
"literal.number.integer.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 617,968 | 617,969 | u223904637 | python |
p02815 | n=int(input())
mod=10**9+7
c=list(map(int,input().split()))
c.sort()
ans=0
for i in range(n):
ans+=c[i]*(n-i)
ans%=mod
print(2*ans*pow(4,n-1,mod)%mod)
| n=int(input())
mod=10**9+7
c=list(map(int,input().split()))
c.sort()
ans=0
for i in range(n):
ans+=c[i]*(n-i+1)
ans%=mod
print((ans*pow(4,n-1,mod))%mod)
| [
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 617,970 | 617,969 | u223904637 | python |
p02815 | n=int(input())
mod=10**9+7
c=list(map(int,input().split()))
c.sort()
ans=0
for i in range(n):
ans+=c[i]*(n-i)
ans%=mod
print(ans*pow(4,n-1,mod)%mod) | n=int(input())
mod=10**9+7
c=list(map(int,input().split()))
c.sort()
ans=0
for i in range(n):
ans+=c[i]*(n-i+1)
ans%=mod
print((ans*pow(4,n-1,mod))%mod)
| [
"call.arguments.change"
] | 617,971 | 617,969 | u223904637 | python |
p02817 | import sys
S, T = next(sys.stdin).strip().split()
print(T, S) | import sys
S, T = next(sys.stdin).strip().split()
print(T + S) | [
"call.arguments.change",
"io.output.change"
] | 617,993 | 617,994 | u317423698 | python |
p02817 | s,t=input().split()
print(s+t) | s,t=input().split()
print(t+s) | [
"expression.operation.binary.remove"
] | 617,995 | 617,996 | u906769651 | python |
p02817 | s,t = input().split()
print(s + t) | s,t = input().split()
print(t + s) | [
"expression.operation.binary.remove"
] | 618,007 | 618,008 | u833416137 | python |
p02817 | a,b=input().split()
for i in a,b:
print(i,end="") | a,b=input().split()
for i in b,a:
print(i,end="")
| [] | 618,023 | 618,024 | u773440446 | python |
p02817 | a,b = input().split()
print(a+b, sep = "", end="") | a,b = input().split()
print(b+a, sep = "", end="") | [
"expression.operation.binary.remove"
] | 618,027 | 618,028 | u440960093 | python |
p02817 | a=input().split()
print(a[0]+a[1]) | a=input().split()
print(a[1]+a[0]) | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 618,039 | 618,040 | u094102716 | python |
p02817 | S,T = list(map(int, input().split()))
print(T+S)
| S,T = map(str, input().split())
print(T+S)
| [
"call.remove",
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 618,045 | 618,046 | u118760114 | python |
p02817 | s, t = input().split()
print(s + t) | s, t = input().split()
print(t + s) | [
"expression.operation.binary.remove"
] | 618,051 | 618,052 | u363421241 | python |
p02817 | s, t = map(str, input().split())
print(''.join([s, t]))
| s, t = map(str, input().split())
print(''.join([t, s])) | [] | 618,055 | 618,056 | u773580152 | python |
p02817 | a = input().split()
print("".join(a)) | a = input().split()
print("".join(reversed(a))) | [
"call.add",
"call.arguments.change"
] | 618,059 | 618,060 | u192433528 | python |
p02817 | a,b=input().split()
print(a+b) | a,b=input().split()
print(b+a) | [
"expression.operation.binary.remove"
] | 618,094 | 618,095 | u243159381 | python |
p02817 | s=input().split()
print(s[0]+s[1])
| s=input().split()
print(s[1]+s[0])
| [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 618,100 | 618,101 | u556594202 | python |
p02817 | S, T = list(map(str,input().split()))
print(S + T) | S, T = list(map(str,input().split()))
print(T + S) | [
"expression.operation.binary.remove"
] | 618,106 | 618,107 | u426205961 | python |
p02817 | print(*input().split(),sep='') | print(*input().split()[::-1],sep='') | [] | 618,108 | 618,109 | u014333473 | python |
p02817 | s,t=map(str,input().split())
print(s,t,sep="")
| s,t=map(str,input().split())
print(t,s,sep="")
| [
"call.arguments.change",
"call.arguments.add"
] | 618,110 | 618,111 | u438189153 | python |
p02817 | a=list(map(str, input().split()))
print('{} {}'.format(a[1],a[0])) | a=list(map(str, input().split()))
print('{}{}'.format(a[1],a[0])) | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 618,112 | 618,113 | u029056424 | python |
p02817 | S,T = input().split()
print(S + T) | S,T = input().split()
print(T + S) | [
"expression.operation.binary.remove"
] | 618,120 | 618,121 | u840841119 | python |
p02817 | a,b = map(str,input().split())
print(b+c)
| a,b = map(str,input().split())
print(b+a)
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 618,126 | 618,127 | u638970023 | python |
p02817 | s = input()
t = input()
print(t+s) | s, t = input().split()
print(t+s) | [
"assignment.variable.change",
"call.remove",
"call.add"
] | 618,142 | 618,143 | u941644149 | python |
p02817 | def stringconcant(S,T):
a = S
b = T
c = a+b
return c
S= input()
T= input()
a = stringconcant(T,S)
print(a) | def stringconcant(S,T):
a=S
b=T
c=a+b
return c
S,T = input().split()
a = stringconcant(T,S)
print(a) | [
"assignment.variable.change",
"call.remove",
"call.add"
] | 618,154 | 618,153 | u863370423 | python |
p02817 | s = list(input().split())
print(s[0]+s[1]) | s = list(input().split())
print(s[1]+s[0]) | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 618,158 | 618,159 | u869519920 | python |
p02817 | ls = list(map(str, input().split()))
print(ls[0]+ls[1]) | ls = list(map(str, input().split()))
print(ls[1]+ls[0]) | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 618,162 | 618,163 | u026155812 | python |
p02817 | s = input()
print(s[1] + s[0]) | s = input().split()
print(s[1] + s[0])
| [
"call.add"
] | 618,172 | 618,173 | u780698286 | python |
p02817 | S, T = map(str,input().split())
print(''.join(map(str,S+T))) | S, T = map(str,input().split())
print(''.join(map(str,T+S))) | [
"expression.operation.binary.remove"
] | 618,187 | 618,188 | u509029769 | python |
p02817 | S,T = input().split()
print(S+T) | S,T = input().split()
print(T+S) | [
"expression.operation.binary.remove"
] | 618,205 | 618,206 | u507145838 | python |
p02817 | #<ABC149>
#<A>
S, T = map(str,input().split())
print(S+T)
| #<ABC149>
#<A>
S, T = map(str,input().split())
print(T+S)
| [
"expression.operation.binary.remove"
] | 618,216 | 618,217 | u880480312 | python |
p02817 | str_list = list(input().split(' '))
print(str_list[0]+str_list[1])
| str_list = list(input().split(' '))
print(str_list[1]+str_list[0])
| [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 618,224 | 618,225 | u295148058 | python |
p02817 | s,t=list(map(str,input().split()))
print(s+t)
| s,t=list(map(str,input().split()))
print(t+s) | [
"expression.operation.binary.remove"
] | 618,226 | 618,227 | u437351386 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.