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

Fixed submission:
s = input()

a = int(s[:2])
b = int(s[2:])

if (a == 00 or a > 12) and b <= 12 and b >= 1:
  print("YYMM")
elif a <= 12 and a >= 1 and (b == 00 or b > 12):
  print("MMYY")
elif a <= 12 and a >= 1 and b <= 12 and b >= 1:
  print("AMBIGUOUS")
else:
  print("NA")

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

a = int(s[:2])
b = int(s[2:])

if a == 0 and b == 0
  print("NA")
elif a > 12 and b <= 12:
  print("YYMM")
elif a <= 12 and b > 12:
  print("MMYY")
elif a <= 12 and b <= 12: 
  print("AMBIGUOUS")
else:
  print("NA")
Problem p03208 (python)

Fixed submission:
n, k = map(int,input().split())
h =[int(input()) for i in range(n)]
h.sort()
ans = 1000000000000

for i in range(len(h)-k+1):
    if h[i+k-1] - h[i] < ans:
        ans = h[i+k-1] - h[i]
        if ans == 0:
            break

print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int,input().split())
h =[int(input()) for i in range(n)]
h.sort()
ans = 100000000

for i in range(len(h)-k+1):
    if h[i+k-1] - h[i] < ans:
        ans = h[i+k-1] - h[i]
        if ans = 0:
            break

print(ans)
Problem p03242 (python)

Fixed submission:
s=list(input())
for c in s:
  if c == "1":
    print("9",end="")
  elif c == "9":
    print("1",end="")
  else:
    print(c)
print()

Buggy submission (verdict: Runtime Error):
s=list(input())
for c in s:
  if c == "1":
    print("9",end="")
  elif c = "9":
    print("1",end="")
  else:
    print(c)
print()
Problem p03307 (python)

Fixed submission:
import fractions

n = int(input())
print(n * 2 // fractions.gcd(2, n))

Buggy submission (verdict: Runtime Error):
import math
 
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

n = int(input())
print(lcm(2,n))

Buggy submission (verdict: Runtime Error):
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

n = int(input())
print(lcm(2,n))
Problem p03631 (python)

Fixed submission:
s = list(input())
if s[0] == s[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
t = [int(input()) for i in range(n)]

print(lcm_list(t))
Problem p03723 (python)

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

if a == b == c and a%2 == 0:
    print(-1) #無限
    exit()

while a%2 == 0 and b%2 == 0 and c%2 == 0:
    ans += 1

    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    
    a = x
    b = y
    c = z

print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
ans = 0

if a == b == c and a%2 == 0:
    print(-1) #無限
    exit()

while x%2 == 0 and y%2 == 0 and z%2 == 0:
    ans += 1

    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    
    a = x
    b = y
    c = z

print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
ans = 0

if a == b == c and a%2 == 0:
    print(-1) #無限
    exit()

while x%2 == 0 and y%2 == 0 and z%2 == 1:
    ans += 1
    
    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    
    a = x
    b = y
    c = z

print(ans)
Problem p03745 (python)

Fixed submission:
n = int(input())
li = list(map(int,input().split()))
x = 0 #まだ未定なら0、単調増加なら1、単調減少なら-1にする
i = 0 #index
ans = 0

if n == 1:
    print(1)
    exit()

while True:
    if x == 0:
        if li[i] < li[i+1]:
            x = 1
        elif li[i] > li[i+1]:
            x = -1
        else:
            x = 0
    if x == 1:
        if li[i] > li[i+1]:
            ans += 1
            x = 0
    if x == -1:
        if li[i] < li[i+1]:
            ans += 1
            x = 0
    i += 1
    if i == n-1:
        break
print(ans+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
li = list(map(int,input().split()))
x = 0 #まだ未定なら0、単調増加なら1、単調減少なら-1にする
i = 0 #index
ans = 0

while True:
    if x == 0:
        if li[i] < li[i+1]:
            x = 1
        elif li[i] > li[i+1]:
            x = -1
        else:
            x = 0
    if x == 1:
        if li[i] > li[i+1]:
            ans += 1
            x = 0
    if x == -1:
        if li[i] < li[i+1]:
            ans += 1
            x = 0
    i += 1
    if i == n-1:
        break

print(ans+1)
Problem p02594 (python)

Fixed submission:
x = int(input())

if x>=30:
  print('Yes')
else :
  print('No')

Buggy submission (verdict: Runtime Error):
x = int(input())

if x>=30:
  print('Yes')
elif :
  print('No')

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

if x>=30:
  print('Yes')
elif :
  print('No')

Buggy submission (verdict: Runtime Error):
input(x)

if x>=30:
  print('yes')
else :
  print('No')

Buggy submission (verdict: Runtime Error):
input(x)

if 30<=x<=40:
  print('yes')
else :
  print('No')
Problem p02594 (python)

Fixed submission:
n = int(input())
if n >= 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
cnt = 0
ans = 0
while(cnt<1000001):
  	cnt += 1
  	ans = (ans*10 + 7)%n
  	if ans == 0:
    	print(cnt)
    
   		break
else:
  
	print(-1)
Problem p02595 (python)

Fixed submission:
n,d = map(int,input().split())
ans = 0
k = d**2
for i in range(n):
  
    x,y = map(int,input().split())
    if (x**2)+(y**2) <= k:
        ans += 1
    else:
        None
print(ans)

Buggy submission (verdict: Runtime Error):
N,D=input().split()
N=int(N)
D=int(D)
cnt = 0
for i in range(N):
    
    p1,p2 = map(int,input().split())
    t = ((p1*p1)(p2*p2))**(0.5)
    if t <= D:
        cnt += 1
    
print(cnt)

Buggy submission (verdict: Runtime Error):
N,D=input().split()
N=int(N)
D=int(D)
cnt = 0
for i in range(N):
    
    p1,p2 = map(int,input().split())
    t = ((p1*p1)(p2*p2))**(0.5)
    if t >= D:
        cnt += 1
    
print(cnt)

Buggy submission (verdict: Runtime Error):
N,D=input().split()
N=int(N)
D=int(D)
cnt = 0
for i in range(N):
  
    
  p1,p2 = map(int,input().split())
  t = ((p1*p1)(p2*p2))**(0.5)
  if t >= D:
    
    cnt += 1
    
print(cnt)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
for i in range(n):
  p1,p2 = map(int,input().split())
  cnt = 0
  t = ((p1*p1)(p2*p2))**(0.5)
  if t >= m:
    cnt += 1
  print(cnt)
Problem p02659 (python)

Fixed submission:
from decimal import *
A,B = input().split()
print(int(int(A)*Decimal(B)))

Buggy submission (verdict: Runtime Error):
import math

A, B = [i for i in input().split()]
print(math.floor(int(A)*Decimal(B)))
Problem p02594 (python)

Fixed submission:
X = int(input())
print("YNeos"[not(X>=30)::2])

Buggy submission (verdict: Runtime Error):
X = int(input())
print("YNeos")[X>29::2]

Buggy submission (verdict: Runtime Error):
X = int(input())
print("YNeos")[x>29::2]
Problem p02762 (python)

Fixed submission:
import sys
import math
import numpy as np
import copy

def dfs(now, group, groups, edges):
    if groups[now] != -1:
        return 0
    groups[now] = group
    cnt = 1
    for to in edges[now]:
        cnt += dfs(to, group, groups, edges)
    return cnt

def main():
    n, m, k = map(int, input().split())
    edges = [list() for i in range(n)]
    ngs = [list() for i in range(n)]
    for i in range(m):
        a, b = map(int, input().split())
        a, b = a-1, b-1
        edges[a].append(b)
        edges[b].append(a)
    for i in range(k):
        c, d = map(int, input().split())
        c, d = c-1, d-1
        ngs[c].append(d)
        ngs[d].append(c)


    cnt = 0
    groups = [-1 for i in range(n)]
    nodes_cnt = list()

    ans = [0 for i in range(n)]
    
    for i in range(n):
        if groups[i] == -1:
            nodes_cnt.append(dfs(i, cnt, groups, edges))
            cnt += 1
        ans[i] = nodes_cnt[groups[i]] - len(edges[i]) - 1
        for ng in ngs[i]:
            if groups[i] == groups[ng]:
                ans[i] -= 1

    print(*ans, sep=" ")

if __name__ == '__main__':
    sys.setrecursionlimit(1000000)
    sys.exit(main())

Buggy submission (verdict: Runtime Error):
import sys
import math
import numpy as np
import copy

def dfs(now, group, groups, edges):
    if groups[now] != -1:
        return 0
    groups[now] = group
    cnt = 1
    for to in edges[now]:
        cnt += dfs(to, group, groups, edges)
    return cnt

def main():
    n, m, k = map(int, input().split())
    edges = [list() for i in range(n)]
    ngs = [list() for i in range(n)]
    for i in range(m):
        a, b = map(int, input().split())
        a, b = a-1, b-1
        edges[a].append(b)
        edges[b].append(a)
    for i in range(k):
        c, d = map(int, input().split())
        c, d = c-1, d-1
        ngs[c].append(d)
        ngs[d].append(c)


    cnt = 0
    groups = [-1 for i in range(n)]
    nodes_cnt = list()

    ans = [0 for i in range(n)]
    
    for i in range(n):
        if groups[i] == -1:
            nodes_cnt.append(dfs(i, cnt, groups, edges))
            cnt += 1
        ans[i] = nodes_cnt[groups[i]] - len(edges[i]) - 1
        for ng in ngs[i]:
            if groups[i] == groups[ng]:
                ans[i] -= 1

    print(*ans, sep=" ")


if __name__ == '__main__':
    sys.exit(main())
Problem p03127 (python)

Fixed submission:
import math
import functools


def gcd(a, b):
    if b == 0:
        return a

    return gcd(b, a%b)
n = int(input())

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

g = functools.reduce(gcd, a)

print(g)

Buggy submission (verdict: Runtime Error):
import math
import functools
n = int(input())

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

g = functools.reduce(math.gcd, a)

print(g)
Problem p02682 (python)

Fixed submission:
a, b, c, k = map(int, input().split())
ans = 0
 
if k - a >= 0:
  k -= a
  if k - b >= 0:
    k -= b
    if k - c >= 0:
      ans = a - c
    else:
      ans = a - k
  else:
    ans = a
else:
  ans = k
  
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())
ans = 0

if k - a >= 0:
  k -= a
  if k - b >= 0:
    k -= b:
    if k - c >= 0:
      ans = a - c
    else:
      ans = a - k
  else:
    ans = a
else:
  ans = k
  
print(ans)
Problem p02833 (python)

Fixed submission:
n = int(input())
ans = 0

if (n //2) *2 != n:
    print(ans)
else:
    n = n // 2
    while n >= 5:
        n = n // 5
        ans += n

    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = n
while m > 10:
    m = m // 10
    ans += m

temp = n // 10
while temp > 5:
    temp = temp // 5
    ans += temp

print(ans)
Problem p03013 (python)

Fixed submission:
n, m = map(int, input().split())
l = [int(input())-1 for _ in range(m)]
res = [0, 1]
skip = 0

if m != 0:
  for i in range(n):
    if i == l[skip]:
      res[0] = res[1]
      res[1] = 0
      if skip < m-1:
        skip += 1
    else:
      tmp = res[1]
      res[1] += res[0]
      res[0] = tmp
      res[1] %= 10**9 + 7
      res[0] %= 10**9 + 7
else:
  for i in range(n):
    tmp = res[1]
    res[1] += res[0]
    res[0] = tmp
    res[1] %= 10**9 + 7
    res[0] %= 10**9 + 7
      
print(res[1])

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [int(input())-1 for _ in range(m)]
res = [0, 1]
skip = 0

for i in range(n):
  if i == l[skip]:
    res[0] = res[1]
    res[1] = 0
    if skip < m-1:
      skip += 1
  else:
    tmp = res[1]
    res[1] += res[0]
    res[0] = tmp
    res[1] %= 10**9 + 7
    res[0] %= 10**9 + 7
    
print(res[1])

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [int(input())-1 for _ in range(m)]
res = [0, 1]
skip = 0

for i in range(n):
  if i == l[skip]:
    res[0] = res[1]
    res[1] = 0
    if skip < m-1:
      skip += 1
  else:
    tmp = res[1]
    res[1] += res[0]
    res[0] = tmp
    res[1] %= 10**9 + 7
    res[0] %= 10**9 + 7
    
print(res[1])
Problem p02829 (python)

Fixed submission:
A=int(input())
B=int(input())
for i in range(1,4):
  if i!=A and i!=B:
    print(i)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
for i in range(1,4):
  if i!=A && i!=B:
    print(i)
Problem p02831 (python)

Fixed submission:
import fractions
N=list(map(int,input().split()))
print(int(N[0]*N[1]/fractions.gcd(N[0],N[1])))

Buggy submission (verdict: Runtime Error):
import math

N=list(map(int,input().split()))
print(math.gcd(N[0].N[1]))
Problem p03208 (python)

Fixed submission:
n, k = map(int, input().split())
h = [int(input()) for i in range(n)]
h = sorted(h)
dif = 10**9

for i in range(n-k+1):
    if dif > h[i+k-1] - h[i]:
        dif = h[i+k-1] - h[i]

print(dif)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000000)

n, k = map(int, input().split())
h_li = [int(input()) for i in range(n)]
a = max(h_li)-min(h_li)
dp = [[-1]*(a+5)]*100010

def dfs(i, choosed):
    if i == n:
        if len(choosed) != k:
            dif = 10000000010
        else:
            dif = max(choosed) - min(choosed)

    elif len(choosed) >= 2 and dp[len(choosed)][max(choosed)-min(choosed)] != -1:
        dif = dp[len(choosed)][max(choosed)-min(choosed)]
            
    elif len(choosed) == k:
        dif = max(choosed) - min(choosed)
        
    else:
        dif = min(
            dfs(i+1, choosed + [h_li[i]]),
            dfs(i+1, choosed)
        )

    return dif

print(dfs(0, []))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h_li = [int(input()) for i in range(n)]
a = max(h_li)-min(h_li)
dp = [[-1]*(a+5)]*100010



def dfs(i, choosed):
    if i == n:
        if len(choosed) != k:
            dif = 10000000010
        else:
            dif = max(choosed) - min(choosed)

    elif len(choosed) >= 2 and dp[len(choosed)][max(choosed)-min(choosed)] != -1:
        dif = dp[len(choosed)][max(choosed)-min(choosed)]
            
    elif len(choosed) == k:
        dif = max(choosed) - min(choosed)
    else:
        dif = min(
            dfs(i+1, choosed + [h_li[i]]),
            dfs(i+1, choosed)
        )

    return dif

print(dfs(0, []))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h_li = [int(input()) for i in range(n)]
dp = [[-1]*1000000010]*100010

def dfs(i, choosed):
    if i == n:
        if len(choosed) != k:
            dif = 10000000010
        else:
            dif = max(choosed) - min(choosed)

    elif len(choosed) >= 2 and dp[len(choosed)][max(choosed)-min(choosed)] != -1:
        dif = dp[len(choosed)][max(choosed)-min(choosed)]
            
    elif len(choosed) == k:
        dif = max(choosed) - min(choosed)
    else:
        dif = min(
            dfs(i+1, choosed + [h_li[i]]),
            dfs(i+1, choosed)
        )

    return dif

print(dfs(0, []))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h_li = [int(input()) for i in range(n)]

def dfs(i, choosed):
    if i == n:
        if len(choosed) != k:
            dif = 10000000000
        else:
            dif = max(choosed) - min(choosed)
            
    elif len(choosed) == k:
        dif = max(choosed) - min(choosed)
    else:
        dif = min(
            dfs(i+1, choosed + [h_li[i]]),
            dfs(i+1, choosed)
        )

    return dif

print(dfs(0, []))
Problem p03242 (python)

Fixed submission:
print(1110-int(input()))

Buggy submission (verdict: Runtime Error):
print(1110-int(inpout()))
Problem p03250 (python)

Fixed submission:
l = [int(i) for i in input().split()]
l.sort()
print(l[2]*10 + l[0] + l[1])

Buggy submission (verdict: Runtime Error):
l = [int(input()) for i in range(3)]
l.sort()
print(l[2]*10 + l[0] + l[1])
Problem p03307 (python)

Fixed submission:
num = int(input())

if num % 2 == 0:
    print(num)
else:
    print(num*2)

Buggy submission (verdict: Runtime Error):
number = int(input())
nums = list(map(int, input().split(" ")))

print(max(nums) - min(nums))

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

if num % 2 == 0:
    print(num)
else:
    print(num*2)

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

if num % 2 == 0:
    print(num)
else:
    print(num*2)
Problem p02594 (python)

Fixed submission:
a = int(input())
res = a > 29 and 'Yes' or 'No'
print(res)

Buggy submission (verdict: Runtime Error):
a = int(input())
print(a > 29 and 'Yes' or 'No)
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()

a = len(S)


if a <= K:
    print(S)
else:
    print(S[:K] + ("..."))

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()

a = len(S)


if a =< K:
    print(S)
else:
    print(S[:K] + ("..."))
Problem p02759 (python)

Fixed submission:
N = int(input())
A = N + 1

if N % 2 == 0:
  print(N // 2)
else:
  print(A // 2)

Buggy submission (verdict: Runtime Error):
n = int(input)
print((n//2)+(n%2))
Problem p02595 (python)

Fixed submission:
N,D = map(int,input().split())
point = [list(map(int, input().split())) for x in range(N)]
count = 0
for i in range(N):
    if D >= (point[i][0]**2+point[i][1]**2)**0.5:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N,D = map(int,input().split())
point = [list(map(int, input().split())) for x in range(N)]
count = 0
for i in range(n):
    if D >= (point[i][0]**2+point[i][1]**2)**0.5:
        count += 1
print(count)
Problem p02594 (python)

Fixed submission:
X = int(input())
if X >= 30 :
  print("Yes")
else :
  print("No")

Buggy submission (verdict: Runtime Error):
int(X)
if X >= 30 :
  print("Yes")
else :
  print("No")

Buggy submission (verdict: Runtime Error):
X = input()
if X >=30:
  print("Yes")
else :
  print("No")

Buggy submission (verdict: Runtime Error):
x = int()
if x >= 30:
  print("yes")
  else
  print("no")
Problem p02595 (python)

Fixed submission:
N,D = map(int,input().split())
a = 0
for num in range(1,N+1) :
  X,Y = map(int,input().split())
  if X*X + Y*Y <= D*D :
    a += 1
print(a)

Buggy submission (verdict: Runtime Error):
N,D = map(int,input().split())
a = 0
for num in N :
  X,Y = map(int,input().split())
  if X*X + Y*Y <= D*D :
    a = 1
print(a)
Problem p02712 (python)

Fixed submission:
N=int(input())
a=1
sum=0
while a in range(N+1):
  if a%3 !=0 and a%5 !=0:
    sum=sum+a
    a = a + 1
  else:a=a+1
print(sum)

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

sum=0
while a in range(N+1):
  if a%3 !=0 and a%5 !=0:
    sum=sum+a
    a = a + 1
  else:a=a+1
print(sum)

Buggy submission (verdict: Runtime Error):
N=input()
a=1
sum=0
while a in range(N):
  if a%3 !=0 and a%5 !=0:
    sum=sum+a
    a = a + 1
print(sum)
Problem p02627 (python)

Fixed submission:
input = str(input())
check = input.isupper()

if check:
    print('A')
else:
    print('a')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
print(a)
Problem p02594 (python)

Fixed submission:
X = int(input())
if(X >= 30):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
input = X
if X >= 30:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
input = int(X)
if X >= 30:
  return 'Yes'
else:
  return 'No'

Buggy submission (verdict: Runtime Error):
input X as int
if X >= 30:
  return 'Yes'
else:
  return'No'
Problem p02622 (python)

Fixed submission:
s=input()
t=input()
ans=0
for i in range(len(s)):
    if s[i]!=t[i]:
        ans+=1
        
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
ans=0
for i in range(s):
    if s[i]!=t[i]:
        ans+=1
        
print(ans)
Problem p02659 (python)

Fixed submission:
from decimal import Decimal

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

print(a*b//1)

Buggy submission (verdict: Runtime Error):
import math

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

b=100*b

print(math.floor(a*b/100))
Problem p02695 (python)

Fixed submission:
from itertools import *

n,m,q=map(int,input().split())

aaa=[]
for i in range(m):
    aaa.append(i+1)

l=[]
for i in range(q):
    a=list(map(int,input().split()))
    l.append(a)

a=list(combinations_with_replacement(aaa,n))
ans=0
for i in a:
    aa=0
    for j in l:
        if i[j[1]-1]-i[j[0]-1]==j[2]:
            aa+=j[3]
    if aa>ans:
        ans=aa
print(ans)

Buggy submission (verdict: Runtime Error):
from itertools import *
from more_itertools import *

n,m,q=map(int,input().split())

aaa=[]
for i in range(m):
    aaa.append(i+1)

l=[]
for i in range(q):
    a=list(map(int,input().split()))
    l.append(a)

a=list(combinations_with_replacement(aaa,n))
ans=0
for i in a:
    aa=0
    for j in l:
        if i[j[1]-1]-i[j[0]-1]==j[2]:
            aa+=j[3]
    if aa>ans:
        ans=aa
print(ans)
Problem p02773 (python)

Fixed submission:
import collections

n=int(input())
l=[]
for _ in range(n):
    l.append(input())

c=collections.Counter(l)
cc=c.most_common()
ccc=[]
for j in cc:
    if j[1]==cc[0][1]:
        ccc.append(j[0])

for k in sorted(ccc):
    print(k)

Buggy submission (verdict: Runtime Error):
import collections

n=int(input())
l=[]
for _ in range(n):
    l.append(input())

c=collections.Counter(l)
ccc=[]
for j in cc:
    if j[1]==max(c.values()):
        ccc.append(j[0])

for k in sorted(ccc):
    print(k)
Problem p02984 (python)

Fixed submission:
a=int(input())
b=list(map(int,input().split()))
c=sum(b[::2])-sum(b[1::2])
d=[c]
for i in b:
    d.append(2*i-c)
    c=2*i-c

d.pop()
print(*d)

Buggy submission (verdict: Runtime Error):
import numpy as np

a=int(input())
b=list(map(int,input().split()))
b=2*np.array(b)
c=[[0 for s in range(a)] for _ in range(a)]
aa=0
for i in c:
    if aa==a-1:
        i[0]=1
        i[aa]=1
    else:
        i[aa+1]=1
        i[aa]=1
    aa+=1
c=np.array(c)

x=np.linalg.solve(c,b)
x=list(x)
for j in range(len(x)):
    x[j]=int(x[j])
print(" ".join(repr(e) for e in x))
Problem p03013 (python)

Fixed submission:
import sys

n,m=map(int,input().split())
c=set(map(int,sys.stdin))

d=[0]*(n+1)
d[0]=1
d[1]=1 if 1 not in c else 0
for j in range(2,n+1):
    if j in c:
        pass
    else:
        d[j]=(d[j-1]+d[j-2])%1000000007

print(d[n])

Buggy submission (verdict: Runtime Error):
import numpy as np

a,b=map(int,input().split())
c=[]
for i in range(b):
    c.append(int(input()))
c.append(a+1)    
def Fib(n):
    fib=1/np.sqrt(5)*(((1+np.sqrt(5))/2)**(n)-((1-np.sqrt(5))/2)**(n))
    return(int(fib))

d=[]
z=-1
for j in c:
    di=j-z-1
    if j-z==1:
        print(0)
        exit()
    else:
        d.append(Fib(di))
        z=j
ans=1
for k in d:
    ans=ans*k
print(ans%1000000007)

Buggy submission (verdict: Runtime Error):
import numpy as np

a,b=map(int,input().split())
c=[]
for i in range(b):
    c.append(int(input()))
c.append(a+1)    
def Fib(n):
    fib=1/np.sqrt(5)*(((1+np.sqrt(5))/2)**(n-1)-((1-np.sqrt(5))/2)**(n-1))
    return(int(fib))

d=[]
z=-1
for j in c:
    di=j-z
    if j-z==1:
        print(0)
        exit()
    else:
        d.append(Fib(di))
        z=j
ans=1
for k in d:
    ans=ans*k
print(ans%1000000007)

Buggy submission (verdict: Runtime Error):
import numpy as np

a,b=map(int,input().split())
c=[]
for i in range(b):
    c.append(int(input()))
c.append(a+1)    
def Fib(n):
    fib=1/np.sqrt(5)*(((1+np.sqrt(5))/2)**(n-1)-((1-np.sqrt(5))/2)**(n-1))
    return(int(fib))

d=[]
z=-1
for j in c:
    d.append(Fib(j-z))
    z=j
ans=1
for k in d:
    ans=ans*k
print(ans%1000000007)
Problem p03107 (python)

Fixed submission:
s=list(input())
a=s.count("0")
b=s.count("1")

print(2*min(a,b))

Buggy submission (verdict: Runtime Error):
s=int(input())
l=[]
def func(a):
    if a%2==0:
        return a/2
    else:
        return 3*a+1

while (s not in l):
    l.append(s)
    s=func(s)

print(len(l)+1)
Problem p02594 (python)

Fixed submission:
x = int(input())
if (x >= 30):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
yha

Buggy submission (verdict: Runtime Error):
aaa

Buggy submission (verdict: Runtime Error):
aaa

Buggy submission (verdict: Runtime Error):
aaa

Buggy submission (verdict: Runtime Error):
aaa

Buggy submission (verdict: Runtime Error):
aaaa
Problem p02594 (python)

Fixed submission:
temp=int(input())
if temp >= 30 :
    answer = "Yes"
else:
    answer = "No"
print(answer)

Buggy submission (verdict: Runtime Error):
temp=int(input())
if temp >= 30 :
    answer = Yes
else:
    answer = No
print(answer)