ZhenlongDai/ACPR huggingface dataset:
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
c = 0
result = 0
for i in S:
    if i=='R':
        c += 1
    else:
        result = max(c, result)
        c = 0
print(result)

Failing test case input:
SSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
c = 0
result = 0
for i in S:
    if i=='R':
        c += 1
    else:
        result = max(c, result)
        c = 0
result = max(c, result)
print(result)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys, math


if(__name__ == "__main__"):
    SSS =  input()
    if(SSS=="RRR" ):
        print(3)
    elif("RR" in SSS):
        print(2)
    else:
        print(1)


Failing test case input:
SSS

Expected output:
0

Actual output:
1


Fixed submission (verdict: Accepted):
import sys, math


if(__name__ == "__main__"):
    SSS =  input()
    if(SSS=="RRR" ):
        print(3)
    elif("RR" in SSS):
        print(2)
    elif("R" in SSS):
        print(1)
    else:
        print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
counter = 0
buffer = 0
if not 'R' in s:
    print(0)
else:
    for i in range(len(s)):
        if s[i] == 'R':
            buffer += 1
        else:
            counter = buffer
            buffer = 0
        if buffer > counter:
            counter = buffer
    print(counter)

Failing test case input:
RS`

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s = input()
counter = 1
buffer = 0
if 'R' not in s:
    print(0)
else:
    for i in range(len(s)):
        if s[i] == 'R':
            buffer += 1
        else:
            if buffer > counter:
                counter = buffer
            buffer = 0
        if buffer > counter:
            counter = buffer
    print(counter)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

import sys
s = input()

num = s.count("R")

if num >= 2:
    if s[1] == "R":
        num = 1

print(num)

Failing test case input:
RRR

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):

import sys
s = input()

num = s.count("R")

if num >= 2:
    if s[1] == "S":
        num = 1

print(num)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import re
r = 0
s = input()
if 'r' not in s:
  print(0)
else:
  x = re.findall('r+',s)
  if len(x) == 2:
      print(1)
  else:
      print(len(x[0]))

Failing test case input:
ISR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import re
r = 0
s = input()
if 'R' not in s:
  print(0)
else:
  x = re.findall('R+',s)
  if len(x) == 2:
      print(1)
  else:
      print(len(x[0]))
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
m = 0
i = 0
s = 0
while i < len(a) :
    if a[i] == "S" :
        if m < s :
            m = s
        s = 0
    if a[i] == "R" :
        s = s + 1
    i = i + 1
print(m)

Failing test case input:
XSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
a = input()
i = 0
m = 0
s = 0
while i < len(a) :
    if a[i] == "R" :
        s = s + 1
    if a[i] == "S" :
        if m < s :
            m = s
        s = 0
    i = i + 1
if m < s :
    m = s
print(m)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

ans = 0
tmp = 0
for i in range(3):
    if s[i] == 'R':
        tmp += 1
    else:
        ans = max(ans, tmp)
        tmp = 0
print(ans)
        


Failing test case input:
USR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s = input()

ans = 0
tmp = 0
for i in range(3):
    if s[i] == 'R':
        tmp += 1
    else:
        ans = max(ans, tmp)
        tmp = 0
print(max(ans, tmp))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

s=input()
flg = 0
cnt = 0
if s[1] == "S":
    flg = 1
for i in range(3):
    if s[i] == "S":
        cnt += 1
print(cnt if flg == 1 else cnt -1)

Failing test case input:
RSS

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
flg = 0
cnt = 0
if s == "SSS":
    print(0)
    exit()
if s[1] == "S":
    flg = 1
for i in range(3):
    if s[i] == "R":
        cnt += 1
if cnt >= 2 and flg == 1:
    print(cnt -1)
else:
    print(cnt)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
if S == 'SSS':
  print(0)
elif S == 'SRR':
  print(2)
elif S == 'RRS':
  print(2)
elif S == 'RRR':
  print(3)

Failing test case input:
RSG

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
S = input()
if S == 'SSS':
  print(0)
elif S == 'SRR':
  print(2)
elif S == 'RRS':
  print(2)
elif S == 'RRR':
  print(3)
else:
  print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
str = input()

if str in 'RRR':
  print(3)
elif str in 'RR':
  print(2)
elif str in 'R':
  print(1)
else:
  print(0)

Failing test case input:
RS^

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
str = input()

if 'RRR' in str:
  print(3)
elif 'RR' in str:
  print(2)
elif 'R' in str:
  print(1)
else:
  print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = list(input())

if "S" in S:
    if S[1] == "S" and (S[0] != "S" or S[2] != "S"):
        print(1)
    elif S[0] == "S" and S[1] == "S" and S[2] == "S":
        print(0)
    else:
        print(2)
else:
    print(3)

Failing test case input:
SRS

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
S = list(input())

if "S" in S:
    if S[1] == "S" and (S[0] != "S" or S[2] != "S"):
        print(1)
    elif S[0] == "S" and S[1] == "S" and S[2] == "S":
        print(0)
    elif S[1] == "R" and S[0] != "R" and S[2] != "R":
        print(1)
    else:
        print(2)
else:
    print(3)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
ans = 0
cnt = 0
for w in S:
  if w == 'S':
    ans = max(ans,cnt)
    cnt = 0
  else:
    cnt += 1
print(ans)

Failing test case input:
SSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
ans = 0
cnt = 0
for w in S:
  if w == 'S':
    ans = max(ans,cnt)
    cnt = 0
  else:
    cnt += 1
ans = max(cnt,ans)
print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = str(input())
ans = 0
if(s[0]=="R"):
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 3
    else:
      ans = 2
  else:
    ans = 1
else:
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 2
    else:
      ans = 1
  else:
    ans = 0

Failing test case input:
RSR

Expected output:
1

Actual output:

Fixed submission (verdict: Accepted):
s = str(input())
ans = 0
if(s[0]=="R"):
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 3
    else:
      ans = 2
  else:
    ans = 1
else:
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 2
    else:
      ans = 1
  else:
    if(s[2]=="R"):
      ans = 1
    else:
      ans = 0
print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()

if S[0] == 'R' and  S[1] == 'R' and S[2] == 'R':
    print(3)
elif S[0] == 'R' and S[1] == 'R':
    print(2)
elif S[1] == 'R' and S[2] == 'R':
    print(2)
elif S[1] == 'R' or S[2] == 'R' or S[1] == 'R':
    print(1)
else:
    print(0)


Failing test case input:
RS^

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()

if S[0] == "R" and S[1] == "R" and S[2] == "R":
    print(3)
elif S[0] == "R" and S[1] == "R":
    print(2)
elif S[1] == "R" and S[2] == "R":
    print(2)
elif S[0] == "R" or S[1] == "R" or S[2] == "R":
    print(1)
else:
    print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = list(input())

if s[0]=='R':
  if s[1]=='R':
    if s[2]=='R':
      print(3)
      exit()
    else:
      print(2)
      exit()
  else:
    print(1)
    exit()
else:
  if s[1]=='R':
    if s[2]=='R':
      print(2)
      exit()
    else:
      print(1)
      exit()
  else:
    print(1)
    exit()
print(0)

Failing test case input:
SSS

Expected output:
0

Actual output:
1


Fixed submission (verdict: Accepted):
s = list(input())

if s[0]=='R':
  if s[1]=='R':
    if s[2]=='R':
      print(3)
      exit()
    else:
      print(2)
      exit()
  else:
    print(1)
    exit()
else:
  if s[1]=='R':
    if s[2]=='R':
      print(2)
      exit()
    else:
      print(1)
      exit()
  else:
    if s[2]=='R':
      print(1)
      exit()
    else:
      print(0)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = list(input())
X = 0
if S[1] == "R":
    if S[0] == S[1] or S[1] == S[2]:
        if S[0] == "R" and S[2] == "R":
            X = 2
        else:
            X = 1
print(X)

Failing test case input:
RSS

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = list(input())
X = 0
if S[1] == "R":
    if S[0] == S[1] or S[1] == S[2]:
        if S[0] == "R" and S[2] == "R":
            X = 3
        else:
            X = 2
    else:
        X=1
elif S[0] == "R" or S[2] =="R":
    X = 1
print(X)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys, math
from functools import lru_cache
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    S = input()
    if S.count('R') == 0:
        print(0)
        return
    cnt = 1
    m = -1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            cnt += 1
        else:
            cnt = 1
        m = max(m, cnt)

    print(m)


if __name__ == '__main__':
    main()

Failing test case input:
RSS

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
import sys, math
from functools import lru_cache
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    S = input()
    r = S.count('R')
    if r == 0:
        print(0)
    elif r == 1:
        print(1)
    elif r == 2:
        print(2 if 'RR' in S else 1)
    else:
        print(3)

if __name__ == '__main__':
    main()

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
main=input().rstrip()
count=0
flag=0
for i in range(3):
    if main[i]=='R' and flag==0:
        count+=1
    elif main[i]=='R' and flag==1:
        count=0
        count+=1
    else:
        flag=1
print(count)


Failing test case input:
SRR

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
main=input().rstrip()
count=0
flag=0
for i in range(3):
    if main[i]=='R' and flag==0:
        count+=1
    elif main[i]=='R' and flag==1:
        count=0
        count+=1
        flag=0
    else:
        flag=1
print(count)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def count_rainy(weather): 
    return len([r for r in weather if r == 'R'])

weather = input()
if len(weather) == 3:
    for w in weather:
        if w == 'S' or w == 'R':
            print(count_rainy(weather))

Failing test case input:
RST

Expected output:
1


Actual output:
1
1


Fixed submission (verdict: Accepted):
def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R'])

weather = input()
print(count_rainy(weather))
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
line = input()
list_str = line.split()
list = []

for i in list_str:
    i = int(i)
    if i%2 == 0:
        list.append(i)

cc = 0
for r in list:
    while r > 1:
        r = r / 2
        cc = cc + 1

print(cc)

Failing test case input:
10
2184 2126 230 5149 1822 4167 1557 1688 300 744

Expected output:
14


Actual output:
73


Fixed submission (verdict: Accepted):
n = int(input())
line = input()
liststr = line.split()
list = []
 
for i in liststr:
    i = int(i)
    list.append(i)
 
 
cc = 0
for r in list:
    while r%2 == 0:
        r = r / 2
        cc = cc + 1
 
 
print(cc)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
List = input()
import re

Shift = re.split(" ",List)
Ctr = 1
Wlist = []


while True:
    if Ctr > N:
        break
    Xn = 1
    while True:
        DW = int(Shift[Ctr-1])
        if DW % (2*Xn) != 0:
            break
        else:
            Xn += 1
    Wlist.append(Xn-1)
    Ctr += 1

print(sum(Wlist))

Failing test case input:
10
2184 1881 75 5149 1822 1706 1557 1688 326 744

Expected output:
12


Actual output:
13


Fixed submission (verdict: Accepted):
N = int(input())
List = input()
import re

Shift = re.split(" ",List)
Ctr = 1
Wlist = []


for Ctr in range(1,N+1):
    Xn = 1
    DW = int(Shift[Ctr-1])
    while True:
        if DW % (2**Xn) != 0:
            break
        else:
            Xn += 1
    Wlist.append(Xn-1)
    Ctr += 1

print(sum(Wlist))

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)

if n_list != []:
    maxnum = max(n_list)
    for num2 in n_list:
        for i in range(len(n_list)):
            if num2 % (i+1)*2 == 0:
                count+=1


print(count)

Failing test case input:
10
2184 2126 168 5149 1822 4167 1557 3434 179 744

Expected output:
12


Actual output:
21


Fixed submission (verdict: Accepted):
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    maxnum = int(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
x = [int(x) for x in input().split()]

cnt=0

for i in range(n):
	if x[i]%2==0:
		cnt+=1
		i+=-1

print(cnt)

Failing test case input:
10
2184 2126 168 3228 1480 2695 3853 3434 443 455

Expected output:
13


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
x = [int(x) for x in input().split()]

cnt=0
i=1

while i<n+1:
	if x[i-1]%2==0:
		x[i-1]=x[i-1]/2
		cnt+=1
		i+=-1
	i+=1

print(cnt)
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
10
2184 2126 168 1800 1480 1870 2580 1945 875 870

Expected output:
17


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
10
2184 2126 168 1800 1480 3501 2580 3434 443 455

Expected output:
16


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

count = 0
for i in a:
  count += bin(i).rfind("1") - 1

print(count)

Failing test case input:
4
766 145 120 17

Expected output:
4


Actual output:
26


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

count = 0
for i in a:
  count += len(bin(i)) - bin(i).rfind("1") - 1

print(count)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for v in a:
    while v%2 is 0:
        ans += 1
        v /= 2
print(ans)

Failing test case input:
10
228 159 101 14 906 132 100 110 199 1024

Expected output:
19


Actual output:
7


Fixed submission (verdict: Accepted):

N = int(input())
A = [int(i) for i in input().split()]
ans = 0
for a in A:
    while a % 2 != 1:
        ans += 1
        a /= 2
print(ans)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = input().split()
print(A)

count = 0
for i in range(len(A)):
    while(int(A[i]) % 2 == 0):
        count += 1
        A[i] = int(A[i])/2
print(count)


Failing test case input:
4
1183 73 218 123

Expected output:
1


Actual output:
['1183', '73', '218', '123']
1


Fixed submission (verdict: Accepted):
n = int(input())
A = input().split()

count = 0
for i in range(len(A)):
    while(int(A[i]) % 2 == 0):
        count += 1
        A[i] = int(A[i])/2
print(count)
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
nums = [int(e) for e in input().split()]
i = 0
count = 0
flag = True
c3 = len(nums) - 1
while(flag):
    for num in nums:
        if num%2 == 0:
            nums[i] /= 2
        elif(c3):
            nums[i] *= 3
            c3 -= 1
        else:
            flag = False
        i += 1
    i = 0
    if(flag):
        count += 1
print(count)

Failing test case input:
3
3 3 8

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
n = input()
lst = [int(e) for e in input().split()]

count = 0
m = 0
f = True
while(f):
    f = False
    for i in range(m,len(lst)):
        if(lst[i]%2 == 0):
            m = i
            f = True
            break
    if(f):
        count += 1
    else:
        break

    lst[m] = int(lst[m]/2)

print(count)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

A = sorted(A)
A = [i for i in A if i % 2 == 0]

a = 0
cnt = 0


while True:
    A = [i / 2 for i in A]
    a += 1
    print(A)
    cnt += a*len([i for i in A if i % 2 == 1])

    if len([i for i in A if i > 1]) == 0:
        break
    A = [i for i in A if i % 2 == 0]
print(cnt)


Failing test case input:
10
2184 2126 168 5149 1822 4167 1557 3434 179 744

Expected output:
12


Actual output:
[84.0, 372.0, 911.0, 1063.0, 1092.0, 1717.0]
[42.0, 186.0, 546.0]
[21.0, 93.0, 273.0]
[]
12


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))

A = sorted(A)
A = [i for i in A if i % 2 == 0]

a = 0
cnt = 0


while True:
    A = [i / 2 for i in A]
    a += 1
    cnt += a*len([i for i in A if i % 2 == 1])

    if len([i for i in A if i > 1]) == 0:
        break
    A = [i for i in A if i % 2 == 0]
print(cnt)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
4
1183 73 63 123

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
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)
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
4
573 127 120 123

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
len_list = int(input())
input_list = [int(x) for x in input().split()][:len_list-1]

n = 0

for x in input_list :
   while (x % 2) == 0 :
      x/=2
      n+=1      
print(n)

Failing test case input:
10
2184 2126 1721 1800 1480 2850 1620 1945 875 1776

Expected output:
17


Actual output:
13


Fixed submission (verdict: Accepted):
len_list = int(input())
input_list = [int(x) for x in input().split()][:len_list]

n = 0

for x in input_list :
   while (x % 2) == 0 :
      x/=2
      n+=1      
print(n)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def xx(x: int):
    
    counter = 0
    while True:
        x_, _ = divmod(x, 2)
        if x_ == 0:
            return counter
        x, counter = x_, counter + 1

n = int(input())
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)

Failing test case input:
4
999 145 120 17

Expected output:
3


Actual output:
6


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3
2 5 22

Expected output:
2


Actual output:
60


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = int(input())
lis = map(int,input().split())

ans = 0
for number in lis:
    while number%2 == 0:
        number /= 2
        ans += 1

Failing test case input:
4
999 127 120 123

Expected output:
3


Actual output:

Fixed submission (verdict: Accepted):
num = int(input())
lis = map(int,input().split())

ans = 0
for number in lis:
    while number%2 == 0:
        number /= 2
        ans += 1
print(ans)
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))

def cnt(n):
    return format(n, 'b')[::-1].find('1')

sum(list(map(cnt, a)))

Failing test case input:
3
5 2 8

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))

def cnt(n):
    return format(n, 'b')[::-1].find('1')

print(sum(list(map(cnt, a))))

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def sanbun2(n , al):

    ans = 0

    for i in al:
        ans += i 

    return ans

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

if __name__ == '__main__':
    main()

Failing test case input:
10
2184 2126 1721 1800 1480 2850 1620 1945 875 1776

Expected output:
17


Actual output:
18377


Fixed submission (verdict: Accepted):
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()

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = [int(i) for i in input().split()]

counter = 0
for i in range(N):
    A = a[i]
    while 2 * 2 <= A:
        while A % 2 == 0:
            A = A/2
            counter += 1
        break
print(counter)


Failing test case input:
3
2 6 13

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
a = [int(i) for i in input().split()]

counter = 0
for i in range(N):
    A = a[i]
    
    while A % 2 == 0:
        A /= 2
        counter += 1
        
print(int(counter))

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = list(map(int, input().split()))

ans = 0
flag = 1
i = 1
while flag:
  y = 2**i
  m = list(map(lambda x: x%y, l))
  print(m)
  if 0 in m:
    ans += m.count(0)
    i += 1
  else:
    flag = 0
print(ans)

Failing test case input:
3
3 3 11

Expected output:
0


Actual output:
[1, 1, 1]
0


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int, input().split()))

ans = 0
flag = 1
i = 1
while flag:
  y = 2**i
  m = list(map(lambda x: x%y, l))
  if 0 in m:
    ans += m.count(0)
    i += 1
  else:
    flag = 0
print(ans)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))

ans = 0
for a in A:
  tmp = format(a, "b")
  ans += len(tmp) - tmp.rfind("1") + 1
print(ans)

Failing test case input:
10
2184 2126 168 3213 1480 2695 1557 3434 443 455

Expected output:
11


Actual output:
31


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int, input().split()))
print(sum(len(format(a, "b")) - format(a, "b").rfind("1")-1 for a in A))
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
a = input()
a = a.split()
L = len(a)
b = []
ans = 0
flag = 1
for i in range(L):
    b.append(int(a[i]))
while(flag):
    for i in range(L):
        flag = 0
        if(b[i] % 2 == 0):
            ans = ans + 1
            b[i] = b[i] / 2
            flag = 1
print(ans)


Failing test case input:
10
763 2126 1721 1800 1480 2850 1620 1945 1280 1776

Expected output:
22


Actual output:
19


Fixed submission (verdict: Accepted):
N = input()
N = int(N)
a = input()
a = a.split()
L = len(a)
b = []
ans = 0
flag = 1
for i in range(L):
    b.append(int(a[i]))
while(flag):
    flag = 0
    for i in range(N):
        if(b[i] % 2 == 0):
            ans = ans + 1
            b[i] = b[i] / 2
            flag = 1
print(ans)

Problem: p03325
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
10
2184 2126 168 3228 1480 2695 3853 3434 443 455

Expected output:
13


Actual output:
3.321928094887362
13


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
10
2184 2126 168 3228 1480 3501 2580 3434 443 455

Expected output:
15


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())

a=list(map(int,input().split()))
b=[]

for i in range(n):
  cnt=1
  while (a[i])%(2**cnt)==0:
    cnt+=1
  b.append(cnt-1)

b.sort()
print(n*b[-1])

Failing test case input:
4
1183 73 120 123

Expected output:
3


Actual output:
12


Fixed submission (verdict: Accepted):
n=int(input())

a=list(map(int,input().split()))
b=[]
sum=0

for i in range(n):
  cnt=1
  while (a[i])%(2**cnt)==0:
    cnt+=1
  b.append(cnt-1)

for i in range(n):
  sum=sum+b[i]
  
print(sum)
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)



Failing test case input:
10
2184 1881 230 5149 1822 4167 1557 1688 300 744

Expected output:
13


Actual output:
[2184, 1881, 230, 5149, 1822, 4167, 1557, 1688, 300, 744]
13


Fixed submission (verdict: Accepted):
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)

Problem: p03325
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

count = 0
for i in a:
  b = bin(i).rfind("1") - 1
  count += b

print(count)

Failing test case input:
4
405 490 327 17

Expected output:
1


Actual output:
31


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

count = 0
for i in a:
  count += len(bin(i)) - bin(i).rfind("1") - 1

print(count)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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


Failing test case input:
10
2184 1881 75 5149 1822 1706 1557 1688 326 744

Expected output:
12


Actual output:
[2184, 1822, 1706, 1688, 326, 744]
[1092.0, 1822, 1706, 1688, 326, 744]
[546.0, 1822, 1706, 1688, 326, 744]
[1822, 1706, 1688, 326, 744]
[1706, 1688, 326, 744]
[1688, 326, 744]
[844.0, 326, 744]
[422.0, 326, 744]
[326, 744]
[744]
[372.0]
[186.0]
12


Fixed submission (verdict: Accepted):
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)
    for i,x in enumerate(a):
        a[i] /= 2
    a = [x for x in a if x%2==0]

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = list(map(int, input().split()))
m = 0
for i in range(len(li)):
  n = li[i]
  while not n % 2:
    m += 1
    n /= 2
else:
  print(m)

Failing test case input:
3
5 2 4

Expected output:
3

Actual output:
0


Fixed submission (verdict: Accepted):
l = int(input())
li = list(map(int, input().split()))
m = 0
for i in range(l):
  n = li[i]
  while not n % 2:
    m += 1
    n /= 2
else:
  print(m)
Problem: p03325
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a_list = list(map(int, input().split()))

ans = 0
for i in range(1, 21):
    s = len([x for x in a_list if x % (2**i) == 0])
    if s == 0:
        break
    ans += s
    print(ans)

print(ans)


Failing test case input:
10
2184 339 111 5149 1822 1706 1047 1688 511 1455

Expected output:
8


Actual output:
4
6
8
8


Fixed submission (verdict: Accepted):
n = int(input())
a_list = list(map(int, input().split()))

ans = 0
for i in range(1, 100):
    s = len([x for x in a_list if x % (2**i) == 0])
    if s == 0:
        break
    ans += s

print(ans)

Problem: p03325
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
res = 0
for i in range(N):
  k = 0
  while A[i] % (2 ** k) == 0:
    k += 1
  res = max(k - 1, res)
print(res)

Failing test case input:
10
2184 2126 168 5149 1822 4167 1557 3434 179 821

Expected output:
9


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
res = 0
for i in range(N):
  k = 0
  while A[i] % (2 ** k) == 0:
    k += 1
  res += k - 1
print(res)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def insu2(n):
    if n == 0:
        return 0

    counter = 0
    flag = 0
    while(flag == 0):
        flag = n % 2
        if flag == 0:
            counter += 1
            n = n / 2
        else:
            break
    return counter

ip = input().split()
usdata = []
c_sum = 0

for i in ip:
    usdata.append(int(i))

for i in usdata:
    add = insu2(i)
    c_sum += add

print(c_sum)



Failing test case input:
10
2184 2126 168 5149 1822 4167 1557 1377 179 744

Expected output:
11


Actual output:
1


Fixed submission (verdict: Accepted):
dustshoot = input()

def insu2(n):
    if n == 0:
        return 0

    counter = 0
    flag = 0
    while(flag == 0):
        flag = n % 2
        if flag == 0:
            counter += 1
            n = n / 2
        else:
            break
    return counter

ip = input().split()
usdata = []
c_sum = 0

for i in ip:
    usdata.append(int(i))

for i in usdata:
    add = insu2(i)
    c_sum += add

print(c_sum)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, *A = map(int, input().split())
ans = 0
for a in A:
  while True:
    a, r = divmod(a, 2)
    if r:
      break
    ans += 1
print(ans)

Failing test case input:
4
999 127 120 149

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
n, *A = map(int, open(0).read().split())
ans = 0
for a in A:
  while True:
    a, r = divmod(a, 2)
    if r == 1:
      break
    ans += 1
print(ans)
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
li = list(map(int,input().split()))

for i in li:
    cnt =0
    while i % 2 == 0:
        i= i / 2
        cnt += 1
print(cnt)

Failing test case input:
10
2184 2126 1721 1800 1024 2528 3360 1945 1280 3188

Expected output:
37


Actual output:
2


Fixed submission (verdict: Accepted):
N=input()
li = list(map(int,input().split()))
cnt =0
for i in li:
    while i % 2 == 0:
        i =  i / 2
        cnt += 1
print(cnt)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())
a_list = list(map(int, input().split()))
cnt = 0
for a in a_list:
    if a % 2 == 0:
        cnt += int(math.log2(a))
print(cnt)


Failing test case input:
4
1767 1844 932 8

Expected output:
7


Actual output:
22


Fixed submission (verdict: Accepted):
N = int(input())
a_list = list(map(int, input().split()))
cnt = 0
for a in a_list:
    if a % 2 == 0:
        while a % 2 == 0:
            a /= 2
            cnt += 1
print(cnt)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = [int(i) for i in input().split()]

counter = 0
for i in range(N):
    A = a[i]
    while 2 * 2 <= A:
        while A % 2 == 0:
            A /= 2
            counter += 1
        break
print(int(counter))


Failing test case input:
3
2 5 22

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
a = [int(i) for i in input().split()]

counter = 0
for i in range(N):
    A = a[i]
    
    while A % 2 == 0:
        A /= 2
        counter += 1
        
print(int(counter))

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Failing test case input:
10
2184 1881 75 5149 1822 1706 1557 1688 326 744

Expected output:
12


Actual output:
0


Fixed submission (verdict: Accepted):
import math
n = input()
a = list(map(int, input().split()))
ans = 0
for i in a:
    ans = ans + (len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(sum(list(map(lambda n: len(bin(n)) - len(bin(n).rstrip("0")), list(map(int, input().split()))))))

Failing test case input:
4
1183 73 120 123

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
_ = input()
print(sum(list(map(lambda n: len(bin(n)) - len(bin(n).rstrip("0")), list(map(int, input().split()))))))
Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
b = []
cnt = 0

for x in a:
    if x % 2 == 0:
        b.append(x)
print(b)
for j in range(len(b)):
    while(b[j] % 2 == 0):
        cnt += 1
        b[j] /= 2

print(cnt)


Failing test case input:
3
2 5 22

Expected output:
2


Actual output:
[2, 22]
2


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
b = []
cnt = 0

for x in a:
    if x % 2 == 0:
        b.append(x)

for j in range(len(b)):
    while(b[j] % 2 == 0):
        cnt += 1
        b[j] /= 2

print(cnt)

Problem: p03325
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
li = list(map(int,input().split()))
cnt =0
for i in li:
    print(i, cnt)
    while i % 2 == 0:
        i =  i / 2
        cnt += 1
print(cnt)

Failing test case input:
3
2 5 13

Expected output:
1


Actual output:
2 0
5 1
13 1
1


Fixed submission (verdict: Accepted):
N=input()
li = list(map(int,input().split()))
cnt =0
for i in li:
    while i % 2 == 0:
        i =  i / 2
        cnt += 1
print(cnt)

Problem: p03325
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


if __name__ == '__main__':
    N = int(input())
    lia = list(map(int, input().split()))

    C = 0
    for i in range(N):
        if lia[i] % 2 ==0:
            C += lia[i] / 2

    print(int(C))

Failing test case input:
4
1183 846 218 115

Expected output:
2


Actual output:
532


Fixed submission (verdict: Accepted):


if __name__ == '__main__':
    N = int(input())
    lia = list(map(int, input().split()))

    C = 0
    for i in range(N):
        if lia[i] % 2 ==0:
            tmp = lia[i]
            while tmp % 2 ==0:
                tmp = tmp / 2
                C += 1

    print(int(C))
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
B=[i for i in A if i%2==0]
C=[i for i in B if i%3==0]
D=[i for i in B if i%5==0]
if len(B)==len(C)+len(D):
    print("APPROVED")
else:
    print("DENIED")

Failing test case input:
3
2 0 110

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
B=[i for i in A if i%2==0]
C=[i for i in B if i%3==0]
D=[i for i in B if i%5==0]
E=[i for i in B if i%15==0]
if len(B)==len(C)+len(D)-len(E):
    print("APPROVED")
else:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

for count in A :
    if count % 2 == 0:
        if count % 3 != 0 and count %5 != 0:
            print("DENIED")

        else:
            print("APPROVED")


Failing test case input:
5
-2 -2 1 1 150

Expected output:
DENIED


Actual output:
DENIED
DENIED
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
f = 0
t = 0

for count in A :
    if count % 2 == 0:
        if count % 3 != 0 and count %5 != 0:
            f = 1
            break

        else:
            t = 1

if f:
    print("DENIED")

elif t and not f:
    print("APPROVED")

else:
    print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = list(map(int, input().split()))
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (len(b) == 0) or (False in b):
  print("APPROVED")
else:
  print("DENIED")

Failing test case input:
3
2 2 75

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
input()
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (False in b):
  print("DENIED")
else:
  print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
a = list(map(int, input().split()))

ok = 0
ng = 0
even = []
for i in a:
    if i % 2 == 0:
        even.append(i)

if len(even) == 0:
    print("DENIED")
    exit()

for i in even:
    if i % 3 != 0 and i % 5 != 0:
        print("DENIED")
        exit()

print("APPROVED")


Failing test case input:
5
-1 -1 1 1 321

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = input()
a = list(map(int, input().split()))

ok = 0
ng = 0
even = []
for i in a:
    if i % 2 == 0:
        if i % 3 != 0 and i % 5 != 0:
            print("DENIED")
            exit()

print("APPROVED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def f(a):
    for i in a:
        if i % 2 == 1:
            pass
        elif i % 2 == 0 and (i % 3 == 0 or i % 5 == 0):
            pass
        else:
            print('DENIED')
            break
    else:
        print('APPROVED')

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


Failing test case input:
5
-2 -2 1 1 189

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
def f(a):
    for i in a:
        if i % 2 == 1:
            pass
        elif i % 2 == 0 and (i % 3 == 0 or i % 5 == 0):
            pass
        else:
            print('DENIED')
            break
    else:
        print('APPROVED')

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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input_first = input().split()
input_second = input().split()

N= input_first
paper = [int(i) for i in input_second]


for num in paper:
    if num %2 == 0:
        if  num % 5  == 0 or num % 3 == 0:
            print('APPROVED')
            sys.exit(0)
        else:
            print('DENIED')
            sys.exit(0)


print('DENIED')


Failing test case input:
5
0 7 4 10 31

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
import sys

def result():


    input_first = input().split()
    input_second = input().split()

    N= input_first
    paper = [int(i) for i in input_second]


    for num in paper:
        if num%2 ==0 and num%3!=0 and num %5 != 0:
            print('DENIED')
            return 

    print('APPROVED')
    return 


result()

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

n = []


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

def cal(n):
    count = 0
    for i in range(len(n)):
        if n[i] % 2 == 0 and n[i] % 3 == 0 and n[i] % 5 == 0:
            count += 1
    if count == len(n):
        print("APPROVED")
    else:
        print("DENIED")

cal(n)


Failing test case input:
3
-1 1 100

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):

x = int(input())

n = []


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

def cal(n):
    count = 0
    for i in range(len(n)):
        if n[i] % 2 == 0:
           if n[i] % 3 == 0 or n[i] % 5 == 0:
                count += 1
        else:
            count += 1
    if count == len(n):
        print("APPROVED")
    else:
        print("DENIED")

cal(n)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
List=list(map(int,input().split()))
nList=[e for e in List if e % 2 == 0]
for f in nList:
  if f % 3 == 0 or f % 5 == 0:
    print("APPROVED")
  else:
    print("DENIED")
    break
  

Failing test case input:
5
0 0 5 1 252

Expected output:
APPROVED


Actual output:
APPROVED
APPROVED
APPROVED


Fixed submission (verdict: Accepted):
N=int(input())
List=list(map(int,input().split()))
nList=[e for e in List if e % 2 == 0]
tmp = []
while nList:
  f = nList.pop()
  if f % 3 != 0 and f % 5 != 0:
    tmp.append(f)
if not tmp:
  print("APPROVED")
else:
  print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def fun(li):
  for i in li:
    if i%2 == 0:
      if i%3 == 0 or i%5 ==0:
        continue;
      else:
        return "DENIED"
    return "APPROVED"
n = int(input())
li = [int(num) for num in input().split(" ")]
print(fun(li))


Failing test case input:
5
1 1 5 5 46

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
def fun(li):
  for i in li:
    if i%2 == 0:
      if i%3 == 0 or i%5 ==0:
        continue;
      else:
        return "DENIED"
  return "APPROVED"
n = int(input())
li = [int(num) for num in input().split(" ")]
print(fun(li))

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inputs = map(int, input().split(" "))

is_denied = False
for i in inputs:
  if i % 2 ==0 and ( i % 3 != 0 and i % 5 != 0):
      is_denied = True
      
if is_denied:
  print("DENIED")
else:
  print("APPROVED")




Failing test case input:
5
2 0 5 1 132

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
input()
inputs = map(int, input().split(" "))

is_denied = False
for i in inputs:
  if i % 2 ==0 and ( i % 3 != 0 and i % 5 != 0):
      is_denied = True
      
if is_denied:
  print("DENIED")
else:
  print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

if b == c:
    print('APPROVED')
else:
    print('DENIED')

Failing test case input:
3
4 26 47

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
o = int(input())
a = list(map(int,input().split()))

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

if (b == c):
    print('APPROVED')
else:
    print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
num_list = list(map(int, input().split()))
r = 'DENIED'
for num in num_list:
    if num % 2 == 0:
        if num % 3 == 0 or num % 5 ==0:
            r = 'APPROVED'
print(r)

Failing test case input:
5
-2 -3 1 1 150

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
num_list = list(map(int, input().split()))
den_list = []
for num in num_list:
    if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            den_list.append(num)
if len(den_list) == 0:
    print('APPROVED')
else:
    print('DENIED')