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()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  Lst=yakusu(a[i])
  for j in len(Lst):
    while a[j]%2==0:
      a[j]==a[j]//2
      m+=1
print(m)

  


n=int(input())
a=list(map(int,input().split()))
b=[]
m=0
for i in range(n):
  b.append(bin(a[i]))
for j in range(n):
  b[j]=b[j][2:]
for k in range(n):
  m=max(m,sum(map(int,''.join(b[j]))))
print(m)

  


n=int(input())
a=list(map(int,input().split()))
b=[]
m=0
c=[]
for i in range(n):
  b.append(bin(a[i]))
for j in range(n):
  c.append(b[j][2:])
for k in range(n):
  m=max(m,sum(list(map(int,c[k]))))
print(m)

  


n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in range(len(yakusu(a[i]))):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

  


n=int(input())
a=list(map(int,input().split()))
b=[]
m=0
for i in range(n):
  b.append(bin(a[i]))
for j in range(n):
  b[j]=b[j][2:]
for k in range(n):
  m=max(m,sum(map(int,''.join(b[j]))))


  

n=int(input())
a=list(map(int,input().split()))
b=[]
m=0
for i in range(n):
  b.append(bin(a[i]))
for j in range(n):
  b[j]=b[j][2:]
for k in range(n):
  m=max(m,sum(list(map(int,b[j]))))
print(m)

  


n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(1,x**(0.5)+1):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return list(set(lst))    
for i in range(n):
  for j in range(len(yakusu(a[i]))):
    while (yakusu(a[i]))[j]%2==0:
      (yakusu(a[i]))[j]==(yakusu(a[i]))[j]//2
      m+=1
print(m)

  


n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in len(yakusu(a[i])):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

  


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

  


n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(1,x**(0.5)+1):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in range(len(yakusu(a[i]))):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

  


n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(1,x**(0.5)+1):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return list(set(lst))    
for i in range(n):
  y=yakusu(a[i])
  for j in range(len(y)):
    while y[j]%2==0:
      y[j]==y[j]//2
      m+=1
print(m)

  


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

  


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted