TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n = int(input())
aas = list(map(int, input().split()))

r = 0
i = 1

print(aas)
while True:
  f = False
  for a in aas:
    if a%2**i == 0:
      r += 1
      f = True
  if not f:
    break
  i += 1
print(r)



n = int(input())
as = list(map(int, input().split()))

r = 0
i = 1
while True:
  for a in as:
    f = False
    if a%2 == 0:
      a /= 2
      r += 1
      f = True
    if not f:
      break
print(r)
  

n = int(input())
aas = list(map(int, input().split()))

r = 0
i = 1
while True:
  f = False
  for a in aas:
    if a%2 == 0:
      a /= 2
      r += 1
      f = True
  if not f:
    break
print(r)
  


n = int(input())
as = list(map(int, input().split()))

r = 0
i = 1
while True:
  f = False
  for a in as:
    if a%2 == 0:
      a /= 2
      r += 1
      f = True
  if not f:
    break
print(r)
  

n = int(input())
aas = list(map(int, input().split()))

r = 0
i = 1

while True:
  f = False
  for a in aas:
    if a%2**i == 0:
      r += 1
      f = True
  if not f:
    break
  i += 1
print(r)



Verdicts: Wrong Answer

Runtime Error

Time Limit Exceeded

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):

def bunkai(num):
    a = []
    while num % 2 == 0:
        a.append(2)
        num //= 2
    f = 3
    while f * f <= num:
        if num % f == 0:
            a.append(f)
            num //= f
        else:
            f += 2
    a.append(num)
    if len(a) == 1:
        a.append(1)
    return a
gyouretu = list(map(int, input().split()))
dst = 0
for g in gyouretu:
    for i in bunkai(g):
        if i == 2:
            dst += 1
print(dst)



def bunkai(num):
    a = []
    while num % 2 == 0:
        a.append(2)
        num //= 2
    f = 3
    while f * f <= num:
        if num % f == 0:
            a.append(f)
            num //= f
        else:
            f += 2
    a.append(num)
    if len(a) == 1:
        a.append(1)
    return a
_ = input()
gyouretu = list(map(int, input().split()))
print(gyouretu)
dst = 0
for g in gyouretu:
    for i in bunkai(g):
        if i == 2:
            dst += 1
print(dst)


def bunkai(num):
    count = 0
    while num % 2 == 0:
        count += 1
        num /= 2
    return count
_ = input()
gyouretu = list(map(int, input().split()))
dst = 0
for g in gyouretu:
    dst += bunkai(g)
print(dst)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=int(input())
a=[int(i) for i in input().split()]
count=0
for ai in a:
        while ai%2==0
            ai=ai/2
            count+=1
print(count)

n=int(input())
a=[int(i) for i in input().split()]
count=0
for ai in a:
    if ai%2==0:
        while ai!=1:
            ai=ai/=2
            count+=1
print(count)

n=int(input())
a=[int(i) for i in input().split()]
count=0
for ai in a:
        while ai%2==0:
            ai=ai/2
            count+=1
print(count)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
def hoge(num):
  for i in range(num):
    if(num % (2 * i) != 0):
      return i
n = int(input())
print(sum(list(map(lambda x: hoge(int(x)), input().split()))))


def hoge(num):
  for i in range(10**10):
    if(num % (2 ** i) != 0):
      return i - 1
    
n = int(input())
print(sum(list(map(lambda x: hoge(int(x)), input().split()))))


Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
import collections
import numpy as np

def prime_factorize(n):
    a = []
    if n%2 ==1:
		a=0
      
    while n % 2 == 0:
		a.append(2)
        n //= 2
    return a

N =int(input())

a = [int(i) for i in input().split()]

ans_array = np.zeros(N)

for i in range(N):
    dummy = prime_factorize(a[i])
  
    ans_array[i] = dummy
ans = int(sum(ans_array))
print(ans)

import collections
import numpy as np

def prime_factorize(n):
	a = 0   
	while n % 2 == 0:
		a+=1
		n //= 2
	return a

N =int(input())

a = [int(i) for i in input().split()]

ans_array = np.zeros(N)

for i in range(N):
    dummy = prime_factorize(a[i])
  
    ans_array[i] = dummy
ans = int(sum(ans_array))
print(ans)


Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
def sanbun2(n , al):

    ans = 0

    for i in al:
        ans += i // 2

    return ans

def main():
    n = int(input())
    al = list(map(int , input().split()))
    print(sanbun2(n , al))

if __name__ == '__main__':
    main()

def sanbun2(n , al):

    ans = 0

    for i in al:
        while i % 2 == 0:
            ans += 1
            i /= 2

    return ans

def main():
    n = int(input())
    al = list(map(int , input().split()))
    print(sanbun2(n , al))

if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
import math
N=int(input())
arr=[int(a) for a in input().split()]
ans=0
for i in range(N):
   ans=ans+int(math.log2(arr[N]))

print(ans)


import math
N=int(input())
arr=[int(a) for a in input().split()]
ans=0
for i in range(N):
   ans=ans+int(math.log2(arr[i]))

print(ans)


N=int(input())
arr=[int(a) for a in input().split()]
ans=0
for i in range(i):
   c=0
   while arr[i]%2 ==0:
      arr[i]=arr[i]//2
      c=c+1
   ans=ans+c

print(ans)


import math
N=int(input())
arr=[int(a) for a in input().split()]
ans=0
for i in range(N):
   ans=ans+math.log2(arr[N])

print(ans)

N=int(input())
arr=[int(a) for a in input().split()]
ans=0
for i in range(N):
   c=0
   while arr[i]%2 ==0:
      arr[i]=arr[i]//2
      c=c+1
   ans=ans+c

print(ans)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))
result = 0
for i in A:
  B = A
  while B % 2 == 0:
    result += 1
    B = B // 2
print(result)

N = int(input())
A = list(map(int,input().split()))
result = 0
for i in A:
  B = i
  while B % 2 == 0:
    result += 1
    B = B // 2
print(result)


Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=input()
l=list(map(int,input().split()))
count=0
for i in range(n):
  num=l[i]
  while num%2==0:
    count+=1
    num=num//2
print(count)

n=int(input())
l=list(map(int,input().split()))
count=0
for i in range(n):
  num=l[i]
  while num%2==0:
    count+=1
    num=num//2
print(count)


Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(a):
    x=0
    while x==0:
        if a[i]%2!=0:
            x=1
        else:
            s+=1
            a[i]/=2
print(s)
         

n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(len(a)):
    x=0
    while x==0:
        if a[i]%2!=0:
            x=1
        else:
            s+=1
            a[i]/=2
print(s)
         



Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
b = 0
#print(a)
for i in range(N):
    while a[i] %2 == 0:
        b += 1
        a[i] /= 2
print(b)

N = int(input())
a = list(map(int, input().split()))
b = 0
for i in range(N):
    while a[i] %2 == 0:
        b += 1
        a[i] /= 2
print(b)

Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
import numpy
n = input()
a =[int(e) for e in input().split(" ")]

a_n = numpy.array(a)
count = 0

for kk in range(10000):
    TF = a_n%2==0
    if any(TF):
        print(a_n)
        tmp = 0
        tmp_i = 0
        for i,j in enumerate(TF):       
            if j:
                if tmp <= a_n[i]:
                    tmp = a_n[i]
                    tmp_i = i
        a_n = a_n * 3
        a_n[tmp_i] = a_n[tmp_i]/6
        if numpy.max(a_n) <= 1000000000:
            count += 1
        else:
            break
    else:
        break
print(count)
 
             

n = input()
a =[int(e) for e in input().split(" ")]

count = 0
for i in a:
    tmp = i
    for j in range(10000):
        if tmp%2 == 0:
            tmp /=2
            count += 1
        else:
            break

print(count)
 
             

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(a[i]%2==0):
            #print(i)
            #a=list(map(lambda x:x*3,a))
            a[i]=int(a[i]/2)
            print(a)
            count+=1
            flag=True
            break
print(count)

n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
i=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(flag=True):
            a[i]=a[i]*3
        elif(a[i]%2==0):
            #print(i)
            a[i]=a[i]/2
            count+=1
            flag=True
        else:
            a[i]=a[i]*3
print(count)

n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        while(a[i]%2==0):
            #print(i)
            #a=list(map(lambda x:x*3,a))
            a[i]=int(a[i]/2)
            #print(a)
            count+=1
            flag=True
            #break
print(count)



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
s=0
for _ i range(n):
  b=a[_]
  while b%2==0:
    b=b/2
    s+=1
print(s)

n=int(input())
a=list(map(int,input().split()))
s=0
for _ in range(n):
  b=a[_]
  while b%2==0:
    b=b/2
    s+=1
print(s)

Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n = int(input())
f = lambda x: 0 if x % 2 > 0 else 1 + f(x // 2)
print((f(int(x)) for x in input().split()))

n = int(input())
f = lambda x: 0 if x % 2 > 0 else 1 + f(x // 2)
print(sum(f(int(x)) for x in input().split()))

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N=int(input())
A=list(int, input().split())
counter=[]
for num in range(N):
  counter.append(0)
for num in range(N):
  while A[num]%2=0:
    A[num]=A[num]/2
    counter[num]+=1
print(sum(counter))
  

N=int(input())
A=list(int, input().split())
counter=[]
for num in range(N):
  counter.append(0)
for num in range(N):
  while A[num]%2==0:
    A[num]=A[num]/2
    counter[num]+=1
print(sum(counter))
  

N=int(input())
A=list(int, input().split())
counter=[]
for num in range(len(A)):
  counter.append(0)
for num in range(len(A)):
  while A[num]%2==0:
    A[num]=A[num]/2
    counter[num]+=1
print(sum(counter))
  

N=int(input())
A=list(map(int, input().split()))
counter=[]
for num in range(len(A)):
  counter.append(0)
for num in range(len(A)):
  while A[num]%2==0:
    A[num]=A[num]/2
    counter[num]+=1
print(sum(counter))
  

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
input()
def f(a):
  a = int(a)
  r = 0
  while a % 2 == 0:
    a /= 2
    r += 1
  return r
print(sum(map(f,input.split())))

input()
def f(a):
  a = int(a)
  r = 0
  while a % 2 == 0:
    a /= 2
    r += 1
  return r
print(sum(map(f, input().split())))


Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
def m2p(ai):
    aii=ai
    k=0
    ra=aii%2
    while ra==0 and aii>0:
        k=k+1
        aii=aii//2
        ra=aii%2
    return k        

n=int(input())
a=list(map(int,input().split()))

m=0
for i in range(n):
    m=m+m2p(a[i])
    print(a[i],m2p(a[i]))
print(m)

n=int(input())
a=list(map(int,input().split()))

icnt=0
for ai in a:
    while ai>0:
        if ai%2==0:
            icnt+=1
            ai=ai//2
        else:
            break
print(icnt)


Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
def I(): return int(input())
def LI(): return list(map(int,input().split()))
##################################################
N = I()
a = [x for x in LI() if x%2==0]
ans = 0
while 1:
    if len(a)==0:
        print(ans)
        break
    print(a)
    for i,x in enumerate(a):
        if i==0:
            a[i] /= 2
    a = [x for x in a if x%2==0]
    ans += 1


def I(): return int(input())
def LI(): return list(map(int,input().split()))
##################################################
N = I()
a = [x for x in LI() if x%2==0]
ans = 0
while 1:
    if len(a)==0:
        print(ans)
        break
    ans += len(a)
    a = [x/2 for x in a if x/2%2==0]

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
#include <stdio.h>
int main(void){
    int n,i;
    scanf("%d",&n);
    long long a[n],ans=0;
    for(i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    for(i=0;i<n;i++){
        while(a[i]%2==0){
            a[i]+=a[i]/2;
            ans++;
        }
    }
    printf("%lld",ans);
    return 0;
}

n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    while a[i]%2==0:
        a[i] = a[i]//2
        ans+=1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
def xx(x: int):
    
    counter = 0
    while True:
        x_, _ = divmod(x, 2)
        if x_ == 0:
            return counter
        x, counter = x_, counter + 1

ns =  list(map(int, input().split()))
evens = list()
for n in ns:
    if n % 2 == 0:
        evens.append(n)
res = 0
for e in evens:
    res += xx(e)
print(res)

def xx(x: int):
    
    counter = 0
    while True:
        x_, y = divmod(x, 2)
        if y != 0:
            return counter
        x, counter = x_, counter + 1

n = int(input())
ns =  list(map(int, input().split()))

res = 0
for n in ns:
    res += xx(n)
print(res)

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n = input()
low = list(map(int, input().split()))
for i in range(n)
	count = 0
	tmp = low[i]
	while tmp % 2 == 0:
		tmp = tmp % 2 
		count = count + 1
        
print(count)

n=int(input())
#print(n)
low = list(map(int,input().split()))
#print("INPUT = ")
#print(low)
count = 0
for i in range(n):
	tmp = int(low[i])
	while tmp % 2 == 0 and tmp !=0:
		tmp = tmp// 2
		count = count + 1
#		print("COUNT=", count, "TMP=",tmp)
#print("ANS = ")
print(count)

Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
c=0
for i in a:while i%2==0:i,c=i/2,c+1
print(c)

n=int(input())
a=list(map(int,input().split()))
c=0
for i in a:
    while i%2==0:i,c=i/2,c+1
print(c)

Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
#include <bits/stdc++.h>
using namespace std;

int main(){
  int N;
  int ans = 0;
  for (int i = 0; i < N; i++){
    int A;
    cin >> A;
    while (A%2 == 0){
      ans++;
      A = A/2
    }
  }
  cout << ans << endl;
}

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for i in A:
        while i%2 == 0:
            ans += 1
            i = i//2
    print(ans)

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for i in A:
        while i%2 == 0:
            ans += 1
            i = i//2
    print(ans)
resolve()

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
from functools import lru_cache
import sys
import numpy as np

sys.setrecursionlimit(10**8)

N = int, input().split()
X = list(map(int, input().split()))

@lru_cache(maxsize=None)
def dp(*x):
    xnum = np.array(x)
    x_seki = xnum.prod()
    result = 0
    while x_seki % 2 == 0:
        x_seki /= 2
        result += 1
    return result - 1
print(dp(*X))

N = input()
xs = map(int, input().split())
cnt = lambda n: bin(n)[::-1].find('1')
print(sum(cnt(x) for x in xs))

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N = int(input())
L = [i for i in map(int,input().split()) if i%2 == 0]
even = 1
i = 0
for i in range(len(L)):
  even *= L[i]
while even // 2 == 0 and even / 2**i >= 1:
  i += 1
print(i)

N = int(input())
L = [i for i in map(int,input().split()) if i%2 == 0]
even = 1
j = 0
print(L)
for i in range(len(L)):
  even *= L[i]
while (even % 2**j == 0):
  j += 1
print(j-1)

import sys
import numpy
N = int(input())
L = [i for i in map(int,input().split()) if i%2 == 0]
L2 = [0 for i in range(len(L))]
if L == []:
  print(0)
  sys.exit(0)
for i in range(len(L)):
    s = 1
    while L[i] % 2**s == 0:
        s += 1
    L2[i] = s-1
Q = numpy.sum(L2)
print(Q)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
import math

N = int(input())
lists = [ int(v) for v in input().split(" ") ]

total = 0

print(math.log2(10))

for l in lists:
  if l % 2 == 0:
    while True:
      if l % 2 == 0:
        l = int(l/2)
        total += 1      
      else:
        break
print(total)

import math

N = int(input())
lists = [ int(v) for v in input().split(" ") ]

total = 0

for l in lists:
  if l % 2 == 0:
    while True:
      if l % 2 == 0:
        l = int(l/2)
        total += 1      
      else:
        break
print(total)

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

sum_div = 0
for i in range(N):
  temp_div = A[i]
  while True:
    if temp_div%2 == 0:
      sum_div += 1
      temp_div = A[i]//2
    else:
      break
print(sum_div)

N = int(input())
A = list(map(int, input().split()))

sum_div = 0
for i in range(N):
  temp_div = A[i]
  while True:
    if temp_div%2 == 0:
      sum_div += 1
      temp_div = temp_div//2
    else:
      break
print(sum_div)

Verdicts: Time Limit Exceeded

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))

ans = 10**9
for i in range(n):
    cnt = 0
    while(1):
        if a[i]%2==0:
            cnt+=1
            a[i]/=2
        else:
            break
    ans = min(ans,cnt)
    
print(ans)

n = int(input())
a = list(map(int,input().split()))

ans = 0
for i in range(n):
    while(1):
        if a[i]%2==0:
            ans+=1
            a[i]/=2
        else:
            break   
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
import math

N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    ans += math.log(i,2)
    
    
print(ans)  

import math

N = int(input())
a = list(map(int,input().split()))
ans = 0

for i in a:
    while True:
        if i %2==0:
            i = i/2
            ans += 1
        else:
            break

print(ans)
        

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N,M = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)
S = []
if N >= M:
  print(0)
  exit()

for i in range(M-1):
  S.append(abs(L[i+1]-L[i]))

  S=sorted(S)
print(sum(S[0:M-N]))



N,M = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)
S = []
if N >= M:
	print(0)
	exit()

for i in range(M-1):
	S.append(abs(L[i+1]-L[i]))
S=sorted(S)
print(sum(S[0:M-N]))



N = int(input())
a = list(map(int, input().split()))
ans = 0

for i in a:
    while True:
        if i % 2 == 0:
            ans += 1
            i //= 2
        else:
            break
print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))
K = 0
for i in range(N):
  while True:
    if(A[i]%2==0):
      A[i]==A[i]//2
      K+=1
    else:
      break
print(K)

N = int(input())
A = list(map(int,input().split()))
K = 0
breaker = 0
while True:
  if(breaker==0):
    break
  M = len(A)
  n = -1
  while True:
    n+=1
    if(n>=M):
      break
    else:
      if(A[n]%2==0):
        A[n]==A[n]//2
        K+=1
      else:
        del A[n]
        M -= 1
        if(len(A)==0):
          breaker+=1
print(K)

N = int(input())
A = list(map(int,input().split()))
K = 0
while !(len(A)==0):
for i in range(len(A)):
  if(A[i]%2==0):
    A[i]==A[i]//2
    K+=1
  else:
    del A[i]
print(K)

N = int(input())
A = list(map(int, input().split()))
cnt = 0

for i in range(N):
    while A[i] % 2 == 0:
        A[i] = A[i] // 2
        cnt += 1

print(cnt)


Verdicts: Time Limit Exceeded

Wrong Answer

Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n=int(input())
l=list(map(int, input().split()))

z=[]
for i in range(n):
    x,y=0,l[i]
    while y%2==0:
        x+=1
        y=y//2
    else:
        z.append(x)
        break

print(sum(z))

n=int(input())
l=list(map(int, input().split()))

z=[]
for i in range(n):
    x,y=0,l[i]
    while y%2==0:
        x+=1
        y=y//2
    else:
        z.append(x)

print(sum(z))

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
D, N = map(int,input().split())
if D == 2:
  if N < 100:
    print(N*10000)
  else:
    print(1010000)
elif D == 1:
  if N < 100:
    print(N*100)
  else:
    print(10100)
else:
  if N < 100:
    print(N)
  else:
    print(101)


def time2(n):
  ans = 0
  while n % 2 == 0:
    n /= 2
    ans += 1
  return ans
N = int(input())
LA = list(map(int, input().split()))
sum = sum(map(time2, LA))
print(sum)


Verdicts: Runtime Error

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):


import math
import collections
N = int(input())
A = list(map(int, input().split()))

def trial_division(n):
  
  factor = []
  
  tmp = int(math.sqrt(n)) + 1
  for num in range(2,tmp):
      while n % num == 0:
          n //= num
          factor.append(num)
  
  if not factor:
      return 0
  else:
      factor.append(n)
      counter = collections.Counter(factor)
      return counter[2]

result = 0

for a in A:
  if a % 2 != 0: continue
  result += trial_division(a)

print(result)



import math
import collections
N = int(input())
A = list(map(int, input().split()))

def trial_division(n):
  
  counter = 0
  while n % 2 == 0:
      n //= 2
      counter += 1
  return counter

result = 0

for a in A:
  if a % 2 != 0: continue
  if a == 2:
    result += 1
  else:
    result += trial_division(a)

print(result)

Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
#coding: utf-8
N = int(input())
L = list(map(int, input().split()))

cnt = 0
tri_cnt = 0

mem = 0


while(tri_cnt != len(L)):
    if(L[mem]%2 == 0):
        mem += 1
    else:
        L[mem] /= 2
        for i in range(len(L)):
            if(i != mem):
                L[i] *= 3
        cnt += 1
        
    for i in range(len(L)):
        if (L[i] % 3 == 0):
            tri_cnt += 1

else:
    print(cnt)

#coding: utf-8
N = int(input())
L = list(map(int, input().split()))

cnt = 0
for i in range(len(L)):
    if(L[i]%2 == 0):
        cnt += 1

ans = 2**cnt

print(ans)

#coding: utf-8
N = int(input())
L = list(map(int, input().split()))

cnt = 0
tri_cnt = 0
mem = 0


while(mem != len(L)):
    if(L[mem]%2 != 0):
        mem += 1
    else:
        L[mem] //= 2
        
        #     if(i != mem):
        #         L[i] = L[i] * 3
        #         print('',end='')
        cnt += 1

    # tri_cnt = 0
    
    #     if (L[i] % 2 != 0):
    #         tri_cnt += 1
else:
    print(cnt)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
v=map(int,input().split())
v=sorted(v)[::-1]
c=0
cnt=0
while 1:
    while 1:
        if v[c]%2:break
        cnt+=1
        v[c]/=2
    c+=1 
    if c>=len(v):break
print(cnt)


n=int(input())
v=map(int,input().split())
v=sorted(v)[::-1]
c=0
cnt=0
while 1:
    while 1:
        if v[c]%2:break
        cnt+=1
        v[c]/=2
    c+=1 
    if c>=n:break
print(cnt)


Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    for j in range(30):
        if a[i]%2 == 0:
            a[i] %= 2
            ans += 1
        else:
            break
print(ans)

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
a = list(map(int, readline().split()))
cnt = 0
for aa in a:
    for i in range(aa):
        if aa % 2 == 0:
            cnt += 1
            aa //= 2
        else:
            break
print(cnt)


Verdicts: Wrong Answer

Accepted
Problem: As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.   Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:                For every i satisfying 1 \leq i \leq N, perform one of the following: "divide a_i by 2" and "multiply a_i by 3".   Here, choosing "multiply a_i by 3" for every i is not allowed, and the value of a_i after the operation must be an integer.   At most how many operations can be performed?

Submission attempts (in order):
def divisionCnt(n):
    cnt = 0
    while n % 2 == 0:
        n = n / 2
        cnt += 1
    return cnt

numbers = [int(i) for i in input().split() if int(i) % 2 == 0]

cnt = 0
for n in numbers:
    cnt += divisionCnt(n)

print(cnt)

def divisionCnt(n):
    cnt = 0
    while n % 2 == 0:
        n = n / 2
        cnt += 1
    return cnt

N = int(input())
numbers = [int(i) for i in input().split() if int(i) % 2 == 0]

cnt = 0
for n in numbers:
    cnt += divisionCnt(n)

print(cnt)

Verdicts: Wrong Answer

Accepted