Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03449 (python)

Fixed submission:
dbflag=""

def debug(*args):
  if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
  if ""!=dbflag:return _INDATA.readline()
  else: return input()


result = -1

N = int(readline())



import numpy as np

A1 = [int(i) for i in readline().split(' ')]
A2 = [int(i) for i in readline().split(' ')]
data = np.zeros((2,N),dtype=int)
data[0,0:N]=A1
data[1,0:N]=A2

#np.reshape(data,[2,N])

memo = np.zeros((2,N), dtype=int)
score = np.zeros((2,N), dtype=int)


def getScore(i,j):
	debug(i,j,data[i,j])
	if i < 0 or j < 0 : return 0

	
	if memo[i,j]: return score[i,j]
	
	return data[i,j] + max(getScore(i-1,j) ,  getScore(i,j-1))

result = getScore(1,N-1)
print(result)

Buggy submission (verdict: Runtime Error):
dbflag="aaa.txt"

def debug(*args):
  if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
  if ""!=dbflag:return _INDATA.readline()
  else: return input()


result = -1

N = int(readline())



import numpy as np

A1 = [int(i) for i in readline().split(' ')]
A2 = [int(i) for i in readline().split(' ')]
data = np.zeros((2,N),dtype=int)
data[0,0:N]=A1
data[1,0:N]=A2

#np.reshape(data,[2,N])

memo = np.zeros((2,N), dtype=int)
score = np.zeros((2,N), dtype=int)


def getScore(i,j):
	if i < 0 or j < 0 : return 0
	
	if memo[i,j]: return score[i,j]
	
	result= data[i,j] + max(getScore(i-1,j) ,  getScore(i,j-1))
	memo[i,j]=1
	return result

result = getScore(1,N-1)
print(result)
Problem p03478 (python)

Fixed submission:
dbflag=""

def debug(*args):
	if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
	if ""!=dbflag:return _INDATA.readline()
	else: return input()


result = 0

N,A,B = map(int, readline().split())



for i5 in range(0,2):
  for i4 in range(0,10):
    for i3 in range(0,10):
      for i2 in range(0,10):
        for i1 in range(0,10):
          s = i5 + i4 + i3 + i2 + i1
          sss = 10000* i5 + 1000 *i4 + 100 * i3 + 10 * i2 + i1
          if sss > N :
            break
            
          if A<= s and s <= B:
            result += sss

print(result)

Buggy submission (verdict: Runtime Error):
dbflag="ccc.txt"

def debug(*args):
	if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
	if ""!=dbflag:return _INDATA.readline()
	else: return input()


result = 0

N,A,B = map(int, readline().split())



for i5 in range(0,2):
  for i4 in range(0,10):
    for i3 in range(0,10):
      for i2 in range(0,10):
        for i1 in range(0,10):
          s = i5 + i4 + i3 + i2 + i1
          sss = 10000* i5 + 1000 *i4 + 100 * i3 + 10 * i2 + i1
          if sss > N :
            break
            
          if A<= s and s <= B:
            result += sss

print(result)
Problem p03494 (python)

Fixed submission:
dbflag=0
def debug(*args):
	if dbflag: print(*args)

result = 0

N =  input() 
N=int(N)

#A =  map(int,input() .split())
A = [int(i) for i in input().split(' ')]

flag= 1

while flag:
	for i in range(len(A)):
		debug(i, A[i])
		if A[i] %2 == 0:
			A[i] = A[i] //2
		else:
			flag = 0
			break
		
	if flag:
		result += 1

print(result)

Buggy submission (verdict: Runtime Error):
dbflag=1
def debug(*args):
	if dbflag: print(*args)

result = 0

N =  input() 
N=int(N)

A =  input() .split()

flag= 1

while flag:
	for i in A.length:
		if A[i] %2 == 0:
			A[i] = A[i] //2
		else:
			flag = 0
			break
		
	if flag:
		result += 1

print(result)

Buggy submission (verdict: Runtime Error):
dbflag=0
def debug(*args):
  if dbflag: print(*args)

result = 0

N =  input() 
N=int(N)

#A =  map(int,input() .split())
A = [int(i) for i in input().split(' ')]

flag= 1

while flag:
	for i in range(len(A)):
		debug(i, A[i])
		if A[i] %2 == 0:
			A[i] = A[i] //2
		else:
			flag = 0
			break
		
	if flag:
		result += 1

print(result
Problem p03852 (python)

Fixed submission:
dbflag=""

def debug(*args):
	if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
	if ""!=dbflag:return _INDATA.readline()
	else: return input()


result = -1

c = readline().rstrip()

BOIN = {'a','i','u','e','o'}


if c in BOIN:
	result = "vowel"
else:
	result = "consonant"

print(result)

Buggy submission (verdict: Runtime Error):
dbflag="aaa.txt"

def debug(*args):
	if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
	if ""!=dbflag:return _INDATA.readline()
	else: return input()


result = -1

c = readline().rstrip()

BOIN = {'a','i','u','e','o'}


if c in BOIN:
	result = "vowel"
else:
	result = "consonant"

print(result)
Problem p03478 (python)

Fixed submission:
N, A, B = map(int, input().split())

def sumEachDigit(n):
    s = str(n)
    array = list(map(int, s))
    return sum(array)

res = 0
for i in range(1, N+1):
    sum_i = sumEachDigit(i)
    if sum_i >= A and sum_i <= B:
        res += i

print(res)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())

def sumEachDigit(n):
    s = str(n)
    array = list(map(int, s))
    return sum(array)

res = 0
for i in range(1, N+1):
    sum_i = sumEachDigit(i)
    if sum_i >= A and sum_i <= B:
        res += i

print(res)
Problem p03455 (python)

Fixed submission:
a,b = map(int, input().split())
if( a*b%2 == 0 ):
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if( a*b%2 == 0 ):
    print("EVEN")
else:
    print("ODD")
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
mul = a*b

if mul%2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
mul = a*b

if mul%2 == 0:
    print("Even")
else:
    print("Odd")
Problem p03493 (python)

Fixed submission:
a = str(input())
si_1 = [a[i]=='1' for i in range(3)]
print(si_1.count(True))

Buggy submission (verdict: Runtime Error):
a = int(input())
si_1 = [str(a)[i]=='1' for i in range(3)]
print(si_1.count(True))
Problem p03494 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
def how_many_times_divisible(n):
    ans = 0
    while n % 2 == 0:
        n /= 2
        ans += 1
    return ans

n = int(input())
a = map(int, input().split)
ans = min(map(how_many_times_divisible, a))
print(ans)
Problem p03456 (python)

Fixed submission:
import math
 
a,b = map(str,input().split())
 
c = int(a + b)
 
if(math.sqrt(c) == int(math.sqrt(c))):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import math

a,b = map(str,input().split())

c = a + b

if(math.sqrt(c) == int(math.sqrt(c))):
  print('Yes')
else:
  print('No')
Problem p04011 (python)

Fixed submission:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
sum = 0
if n >= k:
    sum += k * x
    sum += (n-k) * y
else:
    sum += n*x
print(sum)

Buggy submission (verdict: Runtime Error):
n = input()
k = input()
x = input()
y = input()
sum = 0
sum += k * x
sum += (n-k) * y
print(sum)
Problem p03846 (python)

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

if N % 2 == 0:
    C = []
    for c in [2*i+1 for i in range(N//2)]:
        C += [c] * 2
    if A == C:
        print(2**(N//2) % (10**9 + 7))
    else:
        print(0)
else:
    C = [0]
    for c in [2*i for i in range(1, N//2 + 1)]:
        C += [c] * 2
    if A == C:
        print(2**(N//2) % (10**9 + 7))
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split().sort()

dic = dict()
for a in A:
    a = int(a)
    dic[a] = dic.get(a, 0) + 1

keys = list(dic.keys())
values = list(dic.values())

if N % 2 == 0:
    if keys == [2*i+1 for i in range(N//2)] and values == [2 for i in range(N//2)]:
        print(2**(N//2) % (10**9 + 7))
    else:
        print(0)
else:
    if keys == [2*i for i in range(N//2)] and values == [1] + [2 for i in range(N//2 - 1)]:
        print(2**(N//2) % (10**9 + 7))
    else:
        print(0)
Problem p03965 (python)

Fixed submission:
# -*- coding: utf-8 -*-

s = str(input())
n = len(s)

G = s.count('g')
P = s.count('p')

ans = (G - P) // 2

print(ans)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = str(input())
n = len(s)

dic = dict()
for c in s:
	dic[c] = dic.get(c, 0) + 1

ans = (dic['g'] - dic['p']) // 2

print(ans)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = str(input())
n = len(s)

G = 0
P = 0

dic = dict()
for c in s:
	dic[c] = dic.get(c, 0) + 1

if n % 2 == 0:
	ans = (dic['g'] - dic['p']) / 2
else:
	ans = (dic['g'] - dic['p'] - 1) / 2

print(int(ans))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = str(input())
n = len(s)

G = 0
P = 0

dic = dict()
for c in s:
	dic[c] = dic.get(c, 0) + 1

if n % 2 == 0:
	ans = n / 2 - dic['p']
else:
	ans = (n - 1) / 2 - dic['p']

print(int(ans))
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b%2 != 0:
    print("Odd")
else:
    print("Even")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
else:
    print("Even")
if a*b%2 == 0:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a*b%2 == 0:
    print("Odd")
else:
    orint("Even")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input())
if a*b%2 == 0:
    print("Odd")
else:
    orint("Even")
Problem p03493 (python)

Fixed submission:
a = input()

b=0
if a[0] == "1":
   b+=1
if a[1] == "1":
   b+=1
if a[2] == "1":
   b+=1

print(b)

Buggy submission (verdict: Runtime Error):
_ = input()
a = input()

a = a.split(" ")
b = []
d = 0
flag = True
for i in a:
    if int(i)%2 == 0:
        b.append(int(i))
    else:
        print(0)
        flag = False
        break
if flag == True:
    c = min(b)
    while c%2 == 0:
        c = c/2
        d += 1
    print(d)

Buggy submission (verdict: Runtime Error):
_ = input()
a = input()

a = a.split(" ")
b = []
d = 0
flag = True
for i in a:
    if int(i)%2 == 0:
        b.append(int(i))
    else:
        print(0)
        flag = False
        break
c = min(b)
while c%2 == 0 and flag == True:
    c = c/2
    d += 1
print(d)
Problem p03493 (python)

Fixed submission:
count = 0
for s in input():
  if int(s) == 1:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
count = 0
for s in input():
  if int(s) == 1:
    count+=1
print(count)[
Problem p03494 (python)

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

def exec(a, n):
    if len([x for x in a if x%2 == 0]) == n:
        return [int(x/2) for x in a]
    return []

i = 0
while True:
    t = exec(a, n)
    if len(t):
        i += 1
        a = t
    else:
        break

print(i)

Buggy submission (verdict: Runtime Error):
sum = 0
for num in a:
    sum = sum | num

ans = 0
for t in range(200):
    if sum & 1 == 0:
        sum = sum >> 1
        ans += 1
    else:
        break
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

c = 0
while True:
    t = [int(x/2) for x in a if x%2 == 0]
    if len(t) == n:
        a = t
        count += 1
    else:
        break

print(c)
Problem p03478 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# ABC 083 B - Some Sums
# スペース区切りの整数の入力
b = [int(s) for s in input().split()]
sum = 0
for i in range(1, b[0]+1):
    s = 0
    t = i
    while t != 0:
        s = s + t % 10
        t = t // 10
    if (b[1] <= s) and (s <= b[2]):
        sum = sum + i
print(sum)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# ABC 083 B - Some Sums
# スペース区切りの整数の入力
b = [int(s) for s in input().split()]
sum = 0
for i in range(1, b[0]+1):
    s = 0
    t = i
    while t != 0:
        s = s + t % 10
        t = t // 10
    if (b[1] <= s) and (s <= b[2]):
        sum = sum + i
print(r)
Problem p03455 (python)

Fixed submission:
two_digits = input()
(a, b) = two_digits.split(' ')
if int(a) % 2 == 0 or int(b) % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
two_digits = input()
(a, b) = two_ditigs.split(' ')
if int(a)%2 == 0 or int(b)%2 ==0:
    print('Even')
else:
    print ('Odd')
Problem p03493 (python)

Fixed submission:
chars = input()
count = 0
for char in chars:
    if char == '1':
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
iter_num = input()
variables = input()

raw_variables = variables.split(' ')
variables = list()

for raw_variable in raw_variables:
    variables.append(int(raw_variable))


def calc(variable):
    process_count = 0
    while (variable % 2 == 0):
        process_count += 1
        variable = variable / 2
    return process_count


min_count = None

for variable in variables:
    process_count = calc(variable)
    if min_count is None:
        min_count = process_count
    if process_count < min_count:
        min_count = process_count

print(min_count)
Problem p03854 (python)

Fixed submission:
INPUT_STR = input()


match_patterns = [
    ''.join(list(reversed('dream'))),
    ''.join(list(reversed('dreamer'))),
    ''.join(list(reversed('erase'))),
    ''.join(list(reversed('eraser')))
]

string = ''.join(list(reversed(INPUT_STR)))


def is_concatted_string(string):
    string = ''.join(list(reversed(string)))
    while len(string) != 0:
        for pattern in match_patterns:
            if string.startswith(pattern):
                string = string[len(pattern):]
                if len(string) == 0:
                    return True
                break
        else:
            return False
    return False


if INPUT_STR != '' and is_concatted_string(INPUT_STR):
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
INPUT_STR = input()


match_patterns = [
    ''.join(list(reversed('dream'))),
    ''.join(list(reversed('dreamer'))),
    ''.join(list(reversed('erase'))),
    ''.join(list(reversed('eraser')))
]

reversed_input = ''.join(list(reversed(INPUT_STR)))


def is_concatted_string(string: str):
    if len(string) == 0:
        return True
    else:
        for pattern in match_patterns:
            if string.startswith(pattern):
                string = string[len(pattern):]
                return is_concatted_string(string)
        return False


if INPUT_STR != '' and is_concatted_string(reversed_input):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
INPUT_STR = input()


match_patterns = [
    ''.join(list(reversed('dream'))),
    ''.join(list(reversed('dreamer'))),
    ''.join(list(reversed('erase'))),
    ''.join(list(reversed('eraser')))
]

reversed_input = ''.join(list(reversed(INPUT_STR)))


def is_concatted_string(string: str):
    if len(string) == 0:
        return True
    else:
        for pattern in match_patterns:
            if string.startswith(pattern):
                string = string[len(pattern):]
                return is_concatted_string(string)


if INPUT_STR != '' and is_concatted_string(reversed_input):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
INPUT_STR = input()


match_patterns = [
    ''.join(list(reversed('dream'))),
    ''.join(list(reversed('dreamer'))),
    ''.join(list(reversed('erase'))),
    ''.join(list(reversed('eraser')))
]

reversed_input = ''.join(list(reversed(INPUT_STR)))


def is_concatted_string(string: str):
    if len(string) == 0:
        return True
    else:
        for pattern in match_patterns:
            if string.startswith(pattern):
                string = string[len(pattern):]
                return is_concatted_string(string)


if is_concatted_string(reversed_input):
    print("YES")
else:
    print("NO")
Problem p03448 (python)

Fixed submission:
aa = int(input()) + 1
bb = int(input()) + 1
cc = int(input()) + 1
x = int(input())
count = 0

for a in range(aa):
  for b in range(bb):
    for c in range(cc):
      if 500*a + 100*b + 50*c == x:
        count+=1
print(count)

Buggy submission (verdict: Runtime Error):
aa = input()
bb = input()
cc = input()
x = input()
count = 0

for a in range(aa):
  for b in range(bb):
    for c in range(cc):
      if 500*a + 100*b + 50*c == x:
        count+=1
print(count)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())

if a*b % 2 ==0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = input().split()
if a*b % 2 ==0:
  print("Even")
else:
  print("Odd")
Problem p03493 (python)

Fixed submission:
a = input()
count = 0
for i in range(len(a)):
  if int(a[i]) == 1:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
count = 0
while 1:
  if [int(i/2) for i in a] == [round(i/2, 1) for i in a]:
    count+=1
    a = [int(i/2) for i in a]
  else:
    print(count)
    break
Problem p03494 (python)

Fixed submission:
n = input()
a = list(map(int, input().split()))
count = 0
while 1:
  if [int(i/2) for i in a] == [round(i/2, 1) for i in a]:
    count+=1
    a = [int(i/2) for i in a]
  else:
    print(count)
    break

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input()))
count = 0
while 1:
  b =[int(i/2) for i in a] 
  if a == b:
    count+=1
    a = b
  else:
    print(count)
    break

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input()))
count = 0
while 1:
  b =[int(i/2) for i in a] 
  if a == b:
    count+=1
    a = b
  else:
    print(count)
    break
return 0
Problem p03455 (python)

Fixed submission:
a,b = map(int, input().split())
if (a * b) % 2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
data = input()
data_list = data.split()
if ((data_list[0]*data_list[1])%2 == 0):
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
data = input()
data_list = data.split(" ")
if ((data_list[0]*data_list[1])%2 == 0):
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
data = input()
data_list = data.split(" ")
if ((data_list[0]*data_list[1])%2 == 0):
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
input_data = input().split(" ")
product = int(input_data[0])*int(input_data[2])
if (product % 2 == 0):
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
input_data = raw_input().split(" ")
product = int(input_data[0])*int(input_data[2])
if (product % 2 == 0):
  print("Even")
else:
  print("Odd")
Problem p03493 (python)

Fixed submission:
data = input()
count_one = 0
for i in range(len(data)):
  num = int(data[i])
  if (num == 1):
    count_one += 1
print(count_one)

Buggy submission (verdict: Runtime Error):
data = input()
count_one = 0
for i in len(data):
  num = int(data[i])
  if (num == 1):
    count_one += 1
print(count_one)

Buggy submission (verdict: Runtime Error):
data = input()
count_one = 0
for i in length(data):
  num = int(data[i])
  if (num == 1):
    count_one += 1
print(count_one)
Problem p03456 (python)

Fixed submission:
import math
a,b = map(str , input().split())
i = len(b)
a=int(a)
b=int(b)
n= pow(10,i)*a+b
m=int(math.sqrt(n))
if m*m==n:
 print("Yes")
else:
 print("No")

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int , input().split())
i = len(b)
n= pow(10,i)*a+b
m=int(math.sqrt(n))
if m*m=n:
 print("Yes")
else:
 print("No")
Problem p03471 (python)

Fixed submission:
n,y=map(int,input().split())
y=y/1000
count=0
for i in range(min(int(y/10),n)+1):
    for j in range(min(int((y-10*i)/5),n-i)+1):
        if 10*i+5*j+n-i-j==y:
            print(str(i)+" "+str(j)+" "+str(n-i-j))
            count=1
            break
        elif 10*i+5*j+n-i-j>y:
            break
    if count==1:
        break
if count==0:
    print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
n,y=map(int,input().split())
y=y/1000
count=0
for i in range(y/10):
    for j in range(int(y-10*i)):
        for k in range(int(y-10*i-5*j)):
            if i+5*j+10*k==y:
                print(str(k)+" "+str(j)+" "+str(i))
                count=1
                break
        if count==1:
            break
    if count==1:
        break
if count==0:
    print("-1 -1 -1")
Problem p03493 (python)

Fixed submission:
s=str(input())
print(int(s[0])+int(s[1])+int(s[2]))

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
s = list( map(int , input().split()) )
ans = s[0]
count = 0
for i in range(1,N-1):
 ans = math.gcd(ans,s[i])
while i < pow(10,9):
 if ans%2 == 0:
  count +=1
  ans = ans/2
 else:
  break
print(count)

Buggy submission (verdict: Runtime Error):
s=input()
print(int(s[0])+int(s[1])+int(s[2])
Problem p03494 (python)

Fixed submission:
import fractions
N=int(input())
s = list( map(int , input().split()) )
ans = s[0]
count = 0
for i in range(1,N):
 ans = fractions.gcd(ans,s[i])
while i < pow(10,9):
 if ans%2 == 0:
  count +=1
  ans = ans/2
 else:
  break
print(count)

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
s = list( map(int , input().split()) )
ans = s[0]
count = 0
for i in range(1,N):
 ans = math.gcd(ans,s[i])
while i < pow(10,9):
 if ans%2 == 0:
  count +=1
  ans = ans/2
 else:
  break
print(count)

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
s = list( map(int , input().split()) )
ans = s[0]
count = 0
for i in range(1,N-1):
 ans = math.gcd(ans,s[i])
while i < pow(10,9):
 if ans%2 == 0:
  count +=1
  ans = ans/2
 else:
  break
print(count)

Buggy submission (verdict: Runtime Error):
import math
N=input()
s = list( map(int , input().split()) )
ans = s[0]
count = 0
for i in range(1,N-1):
 ans = math.gcd(ans,s[i])
while i < pow(10,9):
 if ans%2 == 0:
  count +=1
  ans = ans/2
 else:
  break
print(count)
Problem p03448 (python)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            in i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            in i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)
Problem p03493 (python)

Fixed submission:
s = input()
print(s.count('1'))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
# 全体の長さから右から数えて最初に出た1の箇所のインデックスを引く
# 後ろに続く0の数が2で割れる回数にあたる
# 例　全：6 インデックス 2 -1 
ans = float("inf")
for i in A:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") -1 )
print(ans)
Problem p03470 (python)

Fixed submission:
n = int(input())
print(len(set(map(int,[input() for i in range(n)]))))

Buggy submission (verdict: Runtime Error):
n = int(input())
print len(set(map(int,[input() for i in range(n)])))
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
  if a<= sum(list(map(int, list(str(i))))) <= b:
    ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split)
ans = 0
for i in range(n+1):
  if a<= sum(list(map(int, list(str(i))))) <= b:
    ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split)
ans = 0
for i in range(n+1):
  if a<= sum(list(map(int, list(str(i))))) <= b:
    ans += 1
print(ans)