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

Fixed submission:
n = int(input())
mylist = list(map(int,input().split()))
mylist = sorted(mylist, key=abs)
x = mylist[0] - mylist[-1]
print(abs(x))

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
a = int(input())
def getNearestValue(h, a):
	idx = np.abs(np.asarray(h) - a).argmin()
	return h[idx]
print(getNearestValue(h, a))
Problem p03434 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
a = sorted(a, reverse = True)
Alice_hand = a[::2]
Bob_hand = a[1::2]
ans = sum(Alice_hand) - sum(Bob_hand)
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
a = sorted(a, reversed = True)
Alice_hand = a[::2]
Bob_hand = a[1::2]
ans = sum(Alice_hand) - sum(Bob_hand)
print(ans)
Problem p03502 (python)

Fixed submission:
n  = int(input())
kakuketanowa = sum(map(int, list(str(n))))
if n % kakuketanowa == 0:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
n  = int(input())
kakuketanowa = sum(map(int, list(str(n))))
if x % kakuketanowa == 0:
	print("Yes")
else:
	print("No")
Problem p03610 (python)

Fixed submission:
s = input()
print(s[::2])

Buggy submission (verdict: Runtime Error):
s = list(int(input()))
print(s[1::2])

Buggy submission (verdict: Runtime Error):
s = list(map(int,input().split()))
print(s[1::2])
Problem p03644 (python)

Fixed submission:
n = int(input())
t = 1
while True:
	if t * 2 > n:
		break
	t *= 2
print(t)

Buggy submission (verdict: Runtime Error):
 n = int(input())
    t = 1
    while True:
        if t * 2 > n:
		break
	t *= 2
    print(t)

Buggy submission (verdict: Runtime Error):
import sys
def main():
    n = int(input())
    t = 1
    while True:
        if t * 2 > n:
		break
	t *= 2
    print(t)
main()
Problem p03693 (python)

Fixed submission:
r, g, b = map(int, input().split())
if (100 * r + 10 * g + b) % 4 == 0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
r, g, b = map(int, input().split())
if (100 * r + 10 * g + b) % 4 = 0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
r, g, b = map(int, input.split())
if 100 * r + 10 * g + b % 4 = 0:
	print("Yes")
else:
	print("No")
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())
ans = 0
found = False

Y //= 1000

T = 0
for i in range(Y // 10 + 1):
    for j in range((Y - i * 10) // 5 + 1):
        T += 1
        x = Y - i * 10 - j * 5
        if x < 0:
            break
        if i + j + x == N:
            print(i, j, x)
            found = True
            break
    if found:
        break
if not found:
    print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
ans = 0
found = False
for i in range(N + 1):
    for j in range(0, N - i + 1):
        k = N - i - j
        is_sum = i * 10_000 + j * 5_000 + k * 1_000 == Y
        if is_sum:
            print(i, j, k)
            found = True
            break
    if found:
        break
        # for k in range(N):
        #     if i * 10_000 + j * 5_000 + k * 1_000 == Y and i + j + k == N:
        #         print(i, j, k)
        #         found = True
if not found:
    print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
ans = 0
found = False
for i in range(N):
    for j in range(N):
        k = N - i - j
        is_sum = i * 10_000 + j * 5_000 + k * 1_000 == Y
        if is_sum:
            print(i, j, k)
            found = True
            break
    if found:
        break
        # for k in range(N):
        #     if i * 10_000 + j * 5_000 + k * 1_000 == Y and i + j + k == N:
        #         print(i, j, k)
        #         found = True
if not found:
    print("-1 -1 -1")
Problem p02882 (python)

Fixed submission:
import math

a, b, x = map(int,input().split())

answer = 0

if (x / a**2) <= (b/2):
  n = (2*x) / (a*b)
  answer = math.degrees(math.atan(b/n))
elif (a**2 * b) == x:
  answer = 0
else:
  n = ((2*x) / a**2) - b
  answer = 90 - math.degrees(math.atan(a / (b-n) ))

print(answer)

Buggy submission (verdict: Runtime Error):
import math

a, b, x = map(int,input().split())

answer = 0

if (x / a**2) <= (b/2):
  n = (2*x) / (a*b)
  answer = math.degrees(math.atan(b/n))
elif a == 1 and b == 1 and x == 1:
  answer = 0
else:
  n = ((2*x) / a**2) - b
  answer = 90 - math.degrees(math.atan(a / (b-n) ))

print(answer)

Buggy submission (verdict: Runtime Error):
import math

a, b, x = map(int,input().split())

answer = 0

if (x / a**2) <= (b/2):
  n = (2*x) / (a*b)
  answer = math.degrees(math.atan(b/n))
else:
  n = ((2*x) / a**2) - b
  answer = 90 - math.degrees(math.atan(a / (b-n) ))

print(answer)

Buggy submission (verdict: Runtime Error):
import math

a, b, x = map(int,input().split())

answer = 0

if (x / a**2) <= (b/2):
  n = (2*x) / (a*b)
  answer = math.degrees(math.atan(b/n))
else:
  n = ((2*x) / a**2) - b
  answer = 90 - math.degrees(math.atan(a / (b-n) ))

print(answer)
Problem p04043 (python)

Fixed submission:
S = "".join(list(map(str,input().split())))
if S.count("5") == 2 and S.count("7") == 1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
S = "".join(list(map(str,input().split())))
if S.count("5") == 2 and S.count("7") == 1:
  print("YES")
else:
  print("NO)
Problem p02705 (python)

Fixed submission:
import math
R=int(input())
print(R*2*math.pi)

Buggy submission (verdict: Runtime Error):
import math
math.pi
R=int(input())
print(R*2*pi)
Problem p02993 (python)

Fixed submission:
s = input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
S = str（input())

ans = 'Good'

for i in range(3):
  if S[i] == S[i+1]:
    ans = 'Bad'
    break
    
    print(ans)
Problem p02774 (python)

Fixed submission:
from sys import stdin
f_i = stdin

import numpy as np

N, K = map(int, f_i.readline().split())
A = np.array(f_i.read().split(), dtype=int)

A = np.sort(A)
zero_left = A.searchsorted(0, side='left')
zero_right = A.searchsorted(0, side='right')
zero_cnt = zero_right - zero_left
pos = A[zero_right:]
neg = A[:zero_left]

def f(x):
    cnt = 0
    
    if x >= 0:
        cnt += zero_cnt * N
    
    cnt += np.searchsorted(A, x // pos, side='right').sum()
    cnt += (N - np.searchsorted(A, (-x - 1) // (-neg), side='right')).sum()
    
    cnt -= np.count_nonzero(A ** 2 <= x)
    return cnt // 2


left = -10 ** 18
right = 10 ** 18
while left + 1 < right:
    x = (left + right) // 2
    if f(x) >= K:
        right = x
    else:
        left = x

print(right)

Buggy submission (verdict: Runtime Error):
from sys import stdin
#f_i = stdin
f_i = open('test_in_3')#

import numpy as np

N, K = map(int, f_i.readline().split())
A = np.array(f_i.read().split(), dtype=int)

A = np.sort(A)
zero_left = A.searchsorted(0, side='left')
zero_right = A.searchsorted(0, side='right')
zero_cnt = zero_right - zero_left
pos = A[zero_right:]
neg = A[:zero_left]

def f(x):
    cnt = 0
    
    if x >= 0:
        cnt += zero_cnt * N
    
    cnt += np.searchsorted(A, x // pos, side='right').sum()
    cnt += (N - np.searchsorted(A, (-x - 1) // (-neg), side='right')).sum()
    
    cnt -= np.count_nonzero(A ** 2 <= x)
    return cnt // 2


left = -10 ** 18
right = 10 ** 18
while left + 1 < right:
    x = (left + right) // 2
    if f(x) >= K:
        right = x
    else:
        left = x

print(right)
Problem p02775 (python)

Fixed submission:
def solve():
    N = input()
    
    INF = 10 ** 32
    
    dp = [[INF, INF] for i in range(len(N) + 1)]
    dp[0][0] = 0
    
    for i, x in enumerate(int(n) for n in N[::-1]):
        ni = i + 1
        dp[ni][0] = min(dp[i][0] + x, dp[i][1] + x)
        dp[ni][1] = min(dp[i][0] + 11 - x, dp[i][1] + 9 - x)
    
    ans = min(dp[-1])
    
    print(ans)

solve()

Buggy submission (verdict: Runtime Error):
def solve():
    from sys import stdin
    #f_i = stdin
    f_i = open('test_in_3')#
    
    N = f_i.readline().rstrip()
    N = N[::-1] + '0'
    
    INF = 10 ** 32
    
    import numpy as np
    dp = np.full((len(N), 2), INF)
    dp[0][0] = 0
    
    for i, x in enumerate(int(n) for n in N[:-1]):
        ni = i + 1
        dp[ni][0] = min(dp[i] + x)
        dp[ni][1] = min(dp[i][0] + 11 - x, dp[i][1] + 9 - x)
    
    ans = min(dp[-1])
    
    print(ans)

solve()
Problem p02804 (python)

Fixed submission:
def solve():
    from sys import stdin
    f_i = stdin
    
    mod = 10 ** 9 + 7
    
    N, K = map(int, f_i.readline().split())
    A = sorted(map(int, f_i.readline().split()))
    
    comb = 1
    ans = A[K-1] - A[N-K]
    for i, j in zip(range(K, N), range(1, N)):
        comb = comb * i * pow(j, mod - 2, mod) % mod
        ans += (A[i] - A[N-i-1]) * comb
        ans %= mod
    
    print(ans)

solve()

Buggy submission (verdict: Runtime Error):
def solve():
    from sys import stdin
    #f_i = stdin
    f_i = open('test_in_4')#
    
    mod = 10 ** 9 + 7
    
    N, K = map(int, f_i.readline().split())
    A = sorted(map(int, f_i.readline().split()))
    
    num = [1] * (N - K + 1)
    for i, j in zip(range(K, N), range(1, N)):
        num[j] = num[j-1] * i // j
    
    ans = sum(a * n % mod for a, n in zip(A[K-1:], num))
    ans -= sum(a * n % mod for a, n in zip(A, num[::-1]))
    
    print(ans % mod)

solve()
Problem p02839 (python)

Fixed submission:
def solve():
    from sys import stdin
    f_i = stdin
    
    H, W = map(int, f_i.readline().split())
    A = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    B = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    
    dp1 = [0] * W
    bit_width = 80 * (H + W - 2)
    dp1[0] = 1 << (bit_width)
    for A_i, B_i in zip(A, B):
        dp2 = [0] * W
        
        diff = abs(A_i[0] - B_i[0])
        dp2[0] = (dp1[0] << diff) | (dp1[0] >> diff)
        
        for j, t in enumerate(zip(A_i[1:], B_i[1:]), start=1):
            A_ij, B_ij = t
            diff = abs(A_ij - B_ij)
            b = dp1[j] | dp2[j-1]
            dp2[j] = (b << diff) | (b >> diff)
        
        dp1 = dp2
    
    b = bin(dp2[-1])
    b = b[-bit_width-1:]
    print(b.index('1'))
 
solve()

Buggy submission (verdict: Runtime Error):
def solve():
    import numpy as np
    from sys import stdin
    f_i = stdin
    
    H, W = map(int, f_i.readline().split())
    A = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    B = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    
    DP = np.full((H + 1, W + 1, (H * W) * 80), False)
    DP[0][1][0] = True
    for i in range(1, H + 1):
        for j in range(1, W + 1):
            diff = A[i-1][j-1] - B[i-1][j-1]
            for pre_bias in np.where(DP[i-1][j] == True)[0]:
                bias = abs(pre_bias + diff)
                DP[i][j][bias] = True
                bias = abs(pre_bias - diff)
                DP[i][j][bias] = True
            for pre_bias in np.where(DP[i][j-1] == True)[0]:
                bias = abs(pre_bias + diff)
                DP[i][j][bias] = True
                bias = abs(pre_bias - diff)
                DP[i][j][bias] = True
    
    ans = np.where(DP[-1][-1] == True)[0][0]
    print(ans)

solve()

Buggy submission (verdict: Runtime Error):
def solve():
    import numpy as np
    from sys import stdin
    f_i = stdin
    
    H, W = map(int, f_i.readline().split())
    A = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    B = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    
    DP = np.full((H + 1, W + 1, (H * W) * 80), False)
    DP[0][1][0] = True
    for i in range(1, H + 1):
        for j in range(1, W + 1):
            diff = A[i-1][j-1] - B[i-1][j-1]
            for pre_bias in np.where(DP[i-1][j] == True):
                bias = abs(pre_bias + diff)
                DP[i][j][bias] = True
                bias = abs(pre_bias - diff)
                DP[i][j][bias] = True
            for pre_bias in np.where(DP[i][j-1] == True):
                bias = abs(pre_bias + diff)
                DP[i][j][bias] = True
                bias = abs(pre_bias - diff)
                DP[i][j][bias] = True
    
    b = np.where(DP[-1][-1] == True)[-1]
    print(min(b))

solve()
Problem p02852 (python)

Fixed submission:
def solve():
    from collections import deque
    from sys import stdin
    f_i = stdin
    
    N, M = map(int, f_i.readline().split())
    S = f_i.readline().rstrip()
    
    M *= -1
    pos = N
    rec = deque()
    while pos:
        for move in range(M, 0):
            next_pos = pos + move
            if next_pos >= 0 and S[next_pos] == '0':
                pos = next_pos
                rec.appendleft(move)
                break
        else:
            print(-1)
            break
    else:
        print(' '.join(str(-move) for move in rec))

solve()

Buggy submission (verdict: Runtime Error):
def solve():
    from collections import deque
    from sys import stdin
    f_i = stdin
    
    N, M = map(int, f_i.readline().split())
    S = f_i.readline().rstrip()
    
    M *= -1
    pos = N
    rec = deque()
    while pos:
        for move in range(M, 0):
            next_pos = pos + move
            if S[next_pos] == '0' and next_pos >= 0:
                pos = next_pos
                rec.appendleft(move)
                break
        else:
            print(-1)
            break
    else:
        print(' '.join(str(-move) for move in rec))

solve()

Buggy submission (verdict: Runtime Error):
def solve():
    from heapq import heappush, heappop
    from sys import stdin
    f_i = stdin
    
    N, M = map(int, f_i.readline().split())
    M *= -1
    S = f_i.readline().rstrip()
    
    unvisited = [True] * (N + 1)
    unvisited[N] = False
    rec = [[] for i in range(N + 1)]
    hq = [(0, N)] # (cost, pos)
    
    while hq:
        cost, pos = heappop(hq)
        if pos == 0:
            break
        
        cost += 1
        for r in range(M, 0):
            next_pos = pos + r
            if unvisited[next_pos] and S[next_pos] == '0':
                unvisited[next_pos] = False
                rec[next_pos] = [r] + rec[pos]
                heappush(hq, (cost, next_pos))
    else:
        return -1
    
    return ' '.join(str(-r) for r in rec[0])

print(solve())

Buggy submission (verdict: Runtime Error):
def solve():
    from heapq import heappush, heappop
    from sys import stdin
    #f_i = stdin
    f_i = open('146_F_in_s3')#
    
    N, M = map(int, f_i.readline().split())
    M *= -1
    S = f_i.readline().rstrip()
    
    unvisited = [True] * (N + 1)
    unvisited[N] = False
    rec = [[] for i in range(N + 1)]
    hq = [(0, N)] # (cost, pos)
    
    while hq:
        cost, pos = heappop(hq)
        if pos == 0:
            break
        
        cost += 1
        for r in range(M, 0):
            next_pos = pos + r
            if unvisited[next_pos] and S[next_pos] == '0':
                unvisited[next_pos] = False
                rec[next_pos] = [r] + rec[pos]
                heappush(hq, (cost, next_pos))
    else:
        return -1
    
    return ' '.join(str(-r) for r in rec[0])

print(solve())
Problem p02861 (python)

Fixed submission:
def get_dist(p1, p2):
    x1, y1 = p1
    x2, y2 = p2
    return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5

def solve():
    from itertools import combinations
    from math import factorial
    from sys import stdin
    f_i = stdin
    
    N = int(f_i.readline())
    points = tuple(tuple(map(int, f_i.readline().split())) for i in range(N))
    s = sum(get_dist(p1, p2) for p1, p2 in combinations(points, 2))
    print(s * 2 / N)

solve()

Buggy submission (verdict: Runtime Error):
def get_dist(p1, p2):
    x1, y1 = p1
    x2, y2 = p2
    return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5

def solve():
    from itertools import combinations
    from math import factorial
    from sys import stdin
    #f_i = stdin
    f_i = open('145_C_s3')#
    
    N = int(f_i.readline())
    points = tuple(tuple(map(int, f_i.readline().split())) for i in range(N))
    s = sum(get_dist(p1, p2) for p1, p2 in combinations(points, 2))
    print(s * 2 / N)

solve()
Problem p02783 (python)

Fixed submission:
a,b = input().split()
##print(type(a))
a = int (a)
b = int(b)
cnt = 1 
while a - b > 0:
    a=a-b
    cnt = cnt + 1
print(cnt)

Buggy submission (verdict: Runtime Error):
H, A = int(input().split())
H = int(H)
A = int(A)
cnt=1
while H-A>0:
	H=H-A
    cnt=cnt+1
print(cnt)

Buggy submission (verdict: Runtime Error):
a, b = input().split()
print((a+b-1)//b)
Problem p02742 (python)

Fixed submission:
import sys
import re

l = sys.stdin.readline()
l = l.split(' ')
l = [int(str) for str in l]

h = l[0]
w = l[1]

if ( h == 1):
  print("1")
  exit(0)
if ( w == 1):
  print("1")
  exit(0)

out = 0
if( w % 2 == 0):
  if( h % 2 == 0):
    out = h*w/2
  else:
    out = h*w/2
else:
  if( h % 2 == 0):
    out = h*w/2
  else:
    out = h*(w-1)/2+(h+1)/2
  

print(out)
sys.stdout.flush()

Buggy submission (verdict: Runtime Error):
import sys
import re

l = sys.stdin.readline()
l = l.split(' ')
l = [int(str) for str in l]

h = l[0]
w = l[1]

out = 0
for i in range(0,w):
 if( i % 2 == 0):
  if( h % 2 == 1 ):
    out += h/2 + 1 
  else:
    out += h/2
 else:
  out += h/2

print(out)
sys.stdout.flush()
Problem p02744 (python)

Fixed submission:
import sys
import re

l = sys.stdin.readline()
l = int(l)
out = []
def x(stri,l,depth):
  str = 'abcdefghij'
  use = 0
  for i in range(0,l-depth+1):
    if( use == 1):
      break
    cdepth = depth
    cstri = stri
    if ( str[i] not in cstri):
      use = 1
    cstri += str[i] 
    cdepth -= 1
    if( cdepth == 0):
	out.append(cstri)
    else:
	x(cstri,l,cdepth)


stri = 'a'
if( l == 1):
 print stri
 exit(0)
x(stri,l,l-1)

count = 0
for i in out:
  print i


sys.stdout.flush()

Buggy submission (verdict: Runtime Error):
import sys
import re

l = sys.stdin.readline()
l = int(l)
out = []
def x(stri,l,depth):
  str = 'abcdefghij'
  for i in range(0,l-depth+1):
    cdepth = depth
    cstri = stri
    cstri += str[i] 
    cdepth -= 1
    if( cdepth == 0):
	out.append(cstri)
    else:
	x(cstri,l,cdepth)


stri = 'a'
if( l == 1):
 print stri
 exit(0)
x(stri,l,l-1)

ret = {}
count = 0
for i in out:
  prev = '0'
  moji = ""
  for j in i:
    if( prev == j ):
      moji += "E"
    else:
      if( prev > j ):
        moji += "U"
      else:
        moji += "D"
    prev = j
  ret[count] = moji
  count += 1
 
count = 0
kekka = {}
for i in out:
  if( ret[count] not in kekka.values()):
    print i
  kekka[count] = ret[count]
  count += 1


sys.stdout.flush()
Problem p02760 (python)

Fixed submission:
import sys

ar = []
x = sys.stdin.readline()
x = x.split(' ')
ar.extend([int(str) for str in x])
x = sys.stdin.readline()
x = x.split(' ')
ar.extend([int(str) for str in x])
x = sys.stdin.readline()
x = x.split(' ')
ar.extend([int(str) for str in x])

n = int(sys.stdin.readline())
ret = []
for i in range(n):
  b = int(sys.stdin.readline())
  if( b in ar):
    index = ar.index(b)
    ret.append(index)

result = "No"
for i in range(0,3):
  if( i*3+0 in ret and i*3+1 in ret and i*3+2 in ret ):
    result = "Yes"
  if( i+0*3 in ret and i+1*3 in ret and i+2*3 in ret ):
    result = "Yes"
if( 0 in ret and 4 in ret and 8 in ret ):
  result = "Yes"
if( 2 in ret and 4 in ret and 6 in ret ):
  result = "Yes"

print(result)



sys.stdout.flush()

Buggy submission (verdict: Runtime Error):
60 88 34
92 41 43
65 73 48
10
60
43
88
11
48
73
65
41
92
34
Problem p02700 (python)

Fixed submission:
import math

A, B, C, D = input().split()

T_hp = int(A)
T_atk = int(B)
A_hp = int(C)
A_atk = int(D)

T_burstturn = math.ceil(T_hp / A_atk)
A_burstturn = math.ceil(A_hp / T_atk)

if T_burstturn < A_burstturn:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
import math

A, B, C, D = input().split()

T_hp = int(A)
T_atk = int(B)
A_hp = int(C)
A_atk = int(D)

T_burstturn = math.ceil(T_hp / A_atk)
A_burstturn = math.ceil(A_hp / T_atk)

if T_burstturn < A_burstturn:
    print("No")
else:
    prit("Yes")
Problem p02783 (python)

Fixed submission:
import math

hp, atk = input().split()

hp = int(hp)

atk = int(atk)

print(math.ceil(hp / atk))

Buggy submission (verdict: Runtime Error):
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

value = 0

numlist = list((input().split()))

numlist = list(map(int, numlist))

for i in range(atk):
    value = value + numlist[i]
    
if value > hp:
    print("Yes")
else:
    print("No")
Problem p02817 (python)

Fixed submission:
word1, word2 = input().split()

print(word2 + word1)

Buggy submission (verdict: Runtime Error):
A, B, K = input().split()

Takahashi = int(A)
Aoki = int(B)
count = int(K)

t = 0

for i in range(count):
    Takahashi = Takahashi-1
    t = t+1
    if t == count:
        break
    elif Takahashi < 0:
        Takahashi = 0
        Aoki = Aoki-1
        t = t+1
        if Aoki == 0:
            print(Takahashi, Aoki)
            break
    else:
        continue


print(Takahashi, Aoki)

Buggy submission (verdict: Runtime Error):
A, B, K = input().split()

Takahashi = int(A)
Aoki = int(B)
count = int(K)

t = 0

for i in range(count):
    Takahashi = Takahashi-1
    t = t+1
    if t == count:
        break
    elif Takahashi < 0:
        Takahashi = 0
        Aoki = Aoki-1
        t = t+1
        if Aoki == 0:
            print(Takahashi, Aoki)
            break
    else:
        continue


print(Takahashi, Aoki)

Buggy submission (verdict: Runtime Error):
word1 = input()
word2 = input()

print(word1 + word2)
Problem p02780 (python)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools　#pythonで累積和を使うときはitertoolsというライブラリのaccumulateを使う
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = list(itertools.accumulate([x for x in p])) #累積和の計算


#pの中から隣り合う（ｋ個）の和が最大のときの値は？（今回は２＋４＋５＝１１）　ｋ個離れたaccの差が最大なところ
ans=max(acc[i]-acc[i-k] for i in range(k-1,n))
answer=ans/2+k/2

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
	sump=p[i]+p[i+1]+p[i+2]
	if sump>sump0:
	sump0=sump
    
print(sump0/2+K/2)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
	sump=p[i]+p[i+1]+p[i+2]
	if sump>sump0:
	sum0=sump
    
print(sum0/2+K/2)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
 
  sump=p[i]+p[i+1]+p[i+2]
  if sump>sump0:
		sum0=sump
    
print(sum0/2+K/2)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
 
  sump=p[i]+p[i+1]+p[i+2]
  if sump>sump0:
    sum0=sump
    
print(sum0/2+K/2)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
 
for i in range(N-2):
  sump0=0
  sump=p[i]+p[i+1]+p[i+2]
  if sump>smp0:
    sum0=sump
    
print(sum0/2+K/2)

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

for i in range(n-2):
  sump0=0
  sump=p[i]+p[i+1]+p[i+2]
  if sump>smp0:
    sum0=sump
    
print(sum0/2+k/2)
Problem p03000 (python)

Fixed submission:
N,X=map(int,input().split())
L=list(map(int,input().split()))
d=0
k=0
for i in range(N):
  d+=L[i]
  if d<=X:
    k+=1
  else:break
print(k+1)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
A = list(map(int, input().split()))
cnt = 1
D = 0
for a in A:
	D += a
    if D > X:
		break
    cnt += 1

print(cnt)
Problem p02700 (python)

Fixed submission:
A,B,C,D=map(int,input().split())
 
while True:
    C=C-B
    if C<=0:
        break
    A=A-D
    if A<=0:
        break
 
if C<=0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
while True:
	C = C - B
	if C <= 0 : 
		print("Yse")
		break
	A = A - D
	if A <= 0 : 
		print("No")
		break