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

Fixed submission:
# &演算子は、bit形式には使えない。でも、数値には使える
d, g = map(int, input().split())
p = [[0, 0] for i in range(d)]
for i in range(d):
    p[i][0], p[i][1] = map(int, input().split())
## bit全探索

ans = 100000
for i in range(2 ** d):
    sum = 0
    ans_tmp = 0
    s = bin(i)
    #　得点の合計とそれまでの数を反映。
    for j in range(d):
        if bin(2 ** j) == bin(2 ** j & i):
            sum += p[j][0] * (j+1) * 100 + p[j][1]
            ans_tmp += p[j][0]
    if sum < g:
        for j in range(d-1, -1, -1):
            if bin(2 ** j) != bin(2 ** j & i):
                for k in range(p[j][0]-1):
                    sum += (j+1) * 100
                    ans_tmp += 1
                    if g <= sum:
                        break
                if g <= sum:
                    if ans_tmp < ans:
                        ans = ans_tmp
                    break
            else:
                continue
    else:
        if ans_tmp < ans:
            ans = ans_tmp
print(ans)

Buggy submission (verdict: Runtime Error):
d, g = map(int, input().split())
p = [[0,0] for i in range(d)]
for i in range(d):
    p[i][0], p[i][1] = map(int, input().split())
ans = 0
sum = 0
i = d
j = 0
extra_ans = [p[i][0] * (i+1) * 100 + p[i][1] for i in range(d)]
while sum < g:
    j += 1
    ans += 1
    sum += i * 100
    if j == p[i-1][0]:
        sum += p[i-1][1]
        i -= 1
        j = 0
    if sum + extra_ans[i-2] >= g :
        tmp = ans + p[i-2][0]
if tmp < ans:
    ans = tmp
for i in range(d):
    if p[i][0] * (i+1) * 100 + p[i][1] >= g and p[i][0] < ans:
        ans = p[i][0]
print(ans)
Problem p03323 (python)

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

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')

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

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')
Problem p03337 (python)

Fixed submission:
a, b = map(int, input().split())
lis = [a+b, a-b, a*b]
print(max(lis))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
n1 = []
for i in range(n):
    s1 = set()
    for j in range(i):
        for k in range(i+1, n):
            # print(i, j, k, s[j], s[k])
            if s[j] == s[k] and set(s[j]).issubset(s1) is False:
                s1.add(s[j])
            # print('len', len(s1))
    n1.append(len(s1))
print(max(n1))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
n1 = []
for i in range(n):
    s1 = set()
    for j in range(i):
        for k in range(i+1, n):
            # print(i, j, k, s[j], s[k])
            if s[j] == s[k] and set(s[j]).issubset(s1) is False:
                s1.add(s[j])
            # print('len', len(s1))
    n1.append(len(s1))
print(max(n1))
Problem p02982 (python)

Fixed submission:
import numpy as np
import itertools
 
N, D = [int(i) for i in input().split()]
X = []
for i in range(N):
    X.append(np.array([int(i) for i in input().split()]))

d = []
for c in itertools.combinations(X, 2):
    d.append(np.linalg.norm(c[1] - c[0]))

print(len([True for x in d if x.is_integer()]))

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

N, D = [int(i) for i in input().split()]
X = []
for i in range(N):
    X.append(np.array([int(i) for i in input().split()]))

d = []
for c in itertools.combinations(X, 2):
    d.append(np.linalg.norm(c[1] - c[0]))

d = np.array(d)
print(len([True for x in d if x.is_integer()]))
Problem p03160 (python)

Fixed submission:
from sys import stdin
from sys import setrecursionlimit

setrecursionlimit(10**8)


def dp_solve(k, h, dp):
    if dp[k] < inf:
        return dp[k]
    if k == 1:
        dp[1] = abs(h[1]-h[0])
        return dp[1]
    if k == 2:
        dp[2] = min(abs(h[2]-h[1])+abs(h[1]-h[0]), abs(h[2]-h[0]))
        return dp[2]

    dp[k] = min(dp_solve(k-1, h, dp) + abs(h[k]-h[k-1]),
                dp_solve(k-2, h, dp)+abs(h[k]-h[k-2]))
    return dp[k]


if __name__ == "__main__":
    n = int(input())
    h = list(map(int, stdin.readline().split()))
    inf = float('inf')
    dp = [inf]*n

    print(dp_solve(n-1, h, dp))

Buggy submission (verdict: Runtime Error):
from sys import stdin


def dp_solve(k, h, dp):
    if 0 <= dp[k]:
        return dp[k]
    if k == 1:
        dp[1] = abs(h[1]-h[0])
        return dp[1]
    if k == 2:
        dp[2] = min(abs((h[2]-h[1])+abs(h[1]-h[0])), abs(h[2]-h[0]))
        return dp[2]

    dp[k] = min(abs(dp_solve(k-1, h, dp)) + abs(h[k-1]-h[k]),
                abs(dp_solve(k-2, h, dp))+abs(h[k-2]-h[k]))
    return dp[k]


if __name__ == "__main__":
    n = int(input())
    h = list(map(int, stdin.readline().split()))
    dp = [-1]*n

    print(dp_solve(n-1, h, dp))
Problem p03294 (python)

Fixed submission:
from fractions import gcd


def solve(n, ax):
    lcm = 1
    for ai in ax:
        lcm = lcm*ai//gcd(lcm, ai)
    m = lcm-1
    return sum(list(map(lambda x: m % x, ax)))


if __name__ == '__main__':
    n = int(input())
    ax = list(map(int, input().split()))
    print(solve(n, ax))

Buggy submission (verdict: Runtime Error):
from math import gcd


def solve(n, ax):
    lcm = 1
    for ai in ax:
        lcm = lcm*ai//gcd(lcm, ai)
    m=lcm-1
    return sum(list(map(lambda x: (lcm-1)%x, ax)))


if __name__ == '__main__':
    n = int(input())
    ax = list(map(int, input().split()))
    print(solve(n, ax))
Problem p03684 (python)

Fixed submission:
n = int(input())
xs = []
ys = []

for i in range(n):
    x, y = map(int, input().split())
    xs.append((x, i))
    ys.append((y, i))


xs.sort()
ys.sort()

es = []

for i in range(n-1):
    es.append((xs[i+1][0] - xs[i][0], xs[i][1], xs[i+1][1]))
    es.append((ys[i+1][0] - ys[i][0], ys[i][1], ys[i+1][1]))

es.sort()

class UF:
    def __init__(self):
        self.p = {}
    def find(self, x):
        if x not in self.p:
            self.p[x] = x
        if x == self.p[x]:
            return x
        self.p[x] = self.find(self.p[x])
        return self.p[x]
    def merge(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.p[x] = y


uf = UF()
ans = 0
try:
    for d, i0, i1 in es:
        c0 = uf.find(i0)
        c1 = uf.find(i1)
        if c0 == c1:
            continue
        ans += d
        uf.merge(i0, i1)
    print(ans)
except:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
xs = []
ys = []

for i in range(n):
    x, y = map(int, input().split())
    xs.append((x, i))
    ys.append((y, i))


xs.sort()
ys.sort()

es = []

for i in range(n-1):
    es.append((xs[i+1][0] - xs[i][0], xs[i][1], xs[i+1][1]))
    es.append((ys[i+1][0] - ys[i][0], ys[i][1], ys[i+1][1]))

es.sort()


class UF:
    def __init__(self):
        self.p = {}
    def find(self, x):
        if x not in self.p:
            self.p[x] = x
        if x == self.p[x]:
            return x
        self.p[x] = self.find(self.p[x])
        return self.p[x]
    def merge(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.p[x] = y


uf= UF()
ans = 0
for d, i0, i1 in es:
    c0 = uf.find(i0)
    c1 = uf.find(i1)
    if c0 == c1:
        continue
    ans += d
    uf.merge(i0, i1)
print(ans)
Problem p03759 (python)

Fixed submission:
a, b, c = [int(i) for i in input().split(' ')]

if b-a == c-b:
    print('YES')
else:
    print('NO')

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

if b-a == c-b:
    print('YES')
else:
    print('NO')
Problem p03044 (python)

Fixed submission:
from collections import defaultdict

N = int(input())

D = defaultdict(list) 
S = {} #STEPD
for i in range(1,N+1):S[i] = -1
R = defaultdict(int) #ROOT
for i in range(N-1):
    u,v,w = map(int,input().split())
    D[u].append(v)
    D[v].append(u)
    R["{}-{}".format(u,v)] = w
    R["{}-{}".format(v,u)] = w
    
T = [(1,0)]
S[1] = 0
while T:
    n,w = T.pop()
    for d in D[n]:
        wr = R["{}-{}".format(n,d)]
        if S[d]>=0:continue
        else: S[d] = (w+wr)%2
        T.append((d,(w+wr)%2))
        
for k in range(1,N+1):
    print(S[k] if S[k]>=0 else 0)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

N = int(input())

D = defaultdict(list) 
S = defaultdict(lambda: -1) #STEPD
R = defaultdict(int) #ROOT
for i in range(N-1):
    u,v,w = map(int,input().split())
    D[u].append(v)
    D[v].append(u)
    R["{}-{}".format(u,v)] = w
    
T = [(1,0)]
S[n] = 0
while T:
    n,w = T.pop()
    for d in D[n]:
        wr = R["{}-{}".format(n,d)]
        if S[d]>=0:continue
        else: S[d] = (w+wr)%2
        T.append((d,(w+wr)%2))
        
for k in sorted(S.keys()):
    print(S[k])
Problem p03262 (python)

Fixed submission:
from fractions import gcd

N,X = map(int,input().split())

A = sorted(list(map(int,input().split()))+[X])

B = []
for i in range(len(A)-1):
    B.append(A[i+1]-A[i])

G = B[0]
if G>1:
    for b in B[1:]:
        G = gcd(G,b)
        if G==1:break
            
print(G)

Buggy submission (verdict: Runtime Error):
from math import gcd

N,X = map(int,input().split())

A = sorted(list(map(int,input().split()))+[X])

B = []
for i in range(len(A)-1):
    B.append(A[i+1]-A[i])

G = B[0]
if G>1:
    for b in B[1:]:
        G = gcd(G,b)
        if G==1:break
            
print(G)
Problem p03318 (python)

Fixed submission:
LEN = 0

SNK = [1,2,3,4,5,6,7,8,9]
#SNK.append("SUNUKE!:"+str(1))
LEN +=1

for i in range(1,10): SNK.append(i*10+9)
#SNK.append("SUNUKE!:"+str(2))
LEN +=1

#for i in range(1,10): SNK.append(i*100+99)
#SNK.append("SUNUKE!:"+str(3))
LEN +=1

for loop in range(2):
    SNK_sub = list(range(pow(10,loop),pow(10,loop+1)))
    SNK += list(map(lambda x:(x*pow(10,LEN-1))+(pow(10,LEN-1)-1),SNK_sub))
    LEN += len(str(max(SNK_sub)))-1
    for d in SNK_sub: #loop=0のとき，d=1-9
        SNK += [(i*pow(10,LEN-1))+(pow(10,LEN-1)-1) for i in range(10,10*(d+1))]
        SNK += list(map(lambda x:(x*pow(10,LEN))+(pow(10,LEN)-1),SNK_sub[SNK_sub.index(d)+1:]))
        #SNK.append("SUNUKE!:"+str(LEN+3))
        LEN += 1+loop
        if LEN>20:break

print("\n".join(str(i) for i in SNK[:int(input())]))

Buggy submission (verdict: Runtime Error):
SNK = [1,2,3,4,5,6,7,8,9] #1桁目

for i in range(1,10): SNK.append((i*10)+9) #2桁目
for i in range(1,10): SNK.append((i*100)+99) #3桁目

for j in range(9): #4-12桁目
    SNK_sub = [19,29,39,49,59,69,79,89,99]
    SNK_sub = list(map(lambda x:(x*pow(10,2+j))+(pow(10,2+j)-1),SNK_sub))
    for i in range(10,20+(10*j)):
        SNK.append(i*pow(10,2+j)+(pow(10,2+j)-1))
    SNK += SNK_sub[j+1:]
    
for j in range(3): #13,14桁目
    for i in range(10,100):
        SNK.append(i*pow(10,10+j)+(pow(10,10+j)-1))

K = int(input())

for i in range(K):
    print(SNK[i])

Buggy submission (verdict: Runtime Error):
SNK = [1,2,3,4,5,6,7,8,9] #1桁目

for i in range(1,10): SNK.append((i*10)+9) #2桁目
for i in range(1,10): SNK.append((i*100)+99) #3桁目

for j in range(9): #4-12桁目
    SNK_sub = [19,29,39,49,59,69,79,89,99]
    SNK_sub = list(map(lambda x:(x*pow(10,2+j))+(pow(10,2+j)-1),SNK_sub))
    for i in range(10,20+(10*j)):
        SNK.append(i*pow(10,2+j)+(pow(10,2+j)-1))
    SNK += SNK_sub[j+1:]
    
for j in range(2): #13,14桁目
    for i in range(10,100):
        SNK.append(i*pow(10,10+j)+(pow(10,10+j)-1))

K = int(input())

for i in range(K):
    print(SNK[i])
Problem p03551 (python)

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

T = (1900*M)+(100*(N-M))
C = [pow(2,M),pow(2,M)-1]

print(T*C[0])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())

T = (1900*M)+(100*(N-M))
C = [pow(2,M),pow(2,M)-1]

if M==4: M_set[1]=3

a = T*C[0]
if a%C[1]==0:
    a = a//C[1]
    print(a)
else:
    print(a)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())

T = (1900*M)+(100*(N-M))
C = [pow(2,M),pow(2,M)-1]

if M==4: M_set[1]=3

a = T*C[0]
if a%C[1]==0:
    print(a//C[1])
else:
    print(a)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())

T = (1900*M)+(100*(N-M))
C = [pow(2,M),pow(2,M)-1]

if M==4: M_set[1]=3

a = T*C[0]
if a//C[1] %C[1]==0:
    print(a//C[1])
else:
    print(a)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())

T = (1900*M)+(100*(N-M))
C = [pow(2,M),pow(2,M)-1]

if M==4: M_set[1]=3

ans = T*C[0]//C[1] if ans%C[1]==0 else T*C[0]
    
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())

T = (1900*M)+(100*(N-M))
C = [pow(2,M),pow(2,M)-1]

if M==4: M_set[1]=3

print(T*C[0]//C[1] if ans%C[1]==0 else T*C[0])
Problem p03556 (python)

Fixed submission:
import math
N = int(math.sqrt(int(input())))
print(N*N)

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

print(N*N)
Problem p03559 (python)

Fixed submission:
import bisect

N = int(input())
A = sorted(list(map(int,input().split())))
B = list(map(int,input().split()))
C = sorted(list(map(int,input().split())))

ans = 0
#print(A)
#print(C)
for b in B:
    lenA = bisect.bisect_left(A,b)
    lenC = N - bisect.bisect(C,b)
    ans += lenA*lenC
    #print(lenA,lenC)
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = sorted(list(map(int,input().split())))
B = list(map(int,input().split()))
C = sorted(list(map(int,input().split())))

ans = 0
#print(A)
#print(C)
for b in B:
    lenA = bisect.bisect_left(A,b) #競合時は無事無視される
    lenC = N - bisect.bisect_left(C,b) if b not in C else N - C.index(b) - 1
    ans += lenA*lenC
    #print(lenA,lenC)
    
print(ans)
Problem p03583 (python)

Fixed submission:
#%%time
N = int(input())

isok=False
for h in range(1,3501):
    bunsi = 4*h - N
    bunbo = N*h
    if bunsi>0:
        n = (bunbo//bunsi) + 1
        bunsi = 4*h*n - N*(h+n)
        bunbo = N*h*n
        if bunsi>0 and bunbo%bunsi==0:
            w = bunbo//bunsi
            isok = True
            break
        
if isok:
    print(h,n,w)
else:
    print("ここ来たらマジでヤバいが")

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

isok=False
for h in range(1,3501):
    bunsi = 4*h - N
    bunbo = N*h
    if bunsi>0:
        n = (bunbo//bunsi) + 1
        bunsi = 4*h*n - N*(h+n)
        bunbo = N*h*n
        if bunsi>0 and bunbo%bunsi==0:
            w = bunbo//bunsi
            isok = True
            break
        
if isok:
    print(h,n,w)
else:
    print("ここ来たらマジでヤバいが")
Problem p03601 (python)

Fixed submission:
A,B,C,D,E,F = map(int,input().split())

water_sugar = []
sugar_best = []

for a in range(0,31):
    water = A*a
    sugar = E*water
    if water==0:
        pass
    elif (water*100)>F:
        break
    elif (water*100)+sugar>F:
        water_sugar.append([water*100,F-(water*100)])
    elif (water*100)+sugar<=F:
        water_sugar.append([water*100,sugar])
    for b in range(1,31):
        water += B
        sugar = E*water
        if (water*100)>F:
            break
        elif (water*100)+sugar>F:
            water_sugar.append([water*100,F-(water*100)])
        elif (water*100)+sugar<=F:
            water_sugar.append([water*100,sugar])

#print(water_sugar)

for ws in water_sugar:
    sugar = []
    c=0
    while(True):
        s = c*C
        if s<=ws[1]:
            sugar.append(s)
        else:
            break
        while(True):
            s += D
            if s<=ws[1]:
                sugar.append(s)
            else:
                break
        c+=1
    ws[1] = max(sugar)
    sugar_best.append((100*ws[1])/(ws[0]+ws[1]))
    
best = water_sugar[sugar_best.index(max(sugar_best))]

print(best[0]+best[1],best[1])

Buggy submission (verdict: Runtime Error):
A,B,C,D,E,F = map(int,input().split())

water_sugar = []
sugar_best = []
max_sugar = 0

for a in range(0,31):
    water = A*a
    sugar = E*water
    if water==0:
        pass
    elif (water*100)>F:
        break
    elif (water*100)+sugar>F:
        s = F-(water*100)
        water_sugar.append([water*100,s])
    elif (water*100)+sugar<=F:
        s = sugar
        water_sugar.append([water*100,s])
    if s>max_sugar: max_sugar=s
    for b in range(1,31):
        water += B
        sugar = E*water
        if (water*100)>F:
            break
        elif (water*100)+sugar>F:
            s = F-(water*100)
            water_sugar.append([water*100,s])
        elif (water*100)+sugar<=F:
            s = sugar
            water_sugar.append([water*100,s])
        if s>max_sugar: max_sugar=s
        

#print(water_sugar)
#print(max_sugar)

sugar = []
c=0
while(True):
    s = c*C
    if s<=max_sugar:
        sugar.append(s)
    else:
        break
    while(True):
        s += D
        if s<=max_sugar:
            sugar.append(s)
        else:
            break
    c+=1
sugar = sorted(sugar,reverse=True)

#print(sugar)

for ws in water_sugar:
    for s in sugar:
        if s<=ws[1]: break
    ws[1] = s
    sugar_best.append((100*ws[1])/(ws[0]+ws[1]))
    
best = water_sugar[sugar_best.index(max(sugar_best))]

print(best[0]+best[1],best[1])
Problem p03651 (python)

Fixed submission:
#AGC018 A
import fractions

N,K = map(int,input().split())

A = list(map(int,input().split()))
MAX = max(A)

if K in A:
    print("POSSIBLE")
elif K<=MAX:
    GCD = A[0]
    for a in A[1:]: GCD = fractions.gcd(GCD,a)
    if K%GCD==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
#AGC018 A
import math

N,K = map(int,input().split())

A = list(map(int,input().split()))
MAX = max(A)

if K in A:
    print("POSSIBLE")
elif K<=MAX:
    GCD = A[0]
    for a in A[1:]: GCD = math.gcd(GCD,a)
    if K%GCD==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
else:
    print("IMPOSSIBLE")
Problem p03741 (python)

Fixed submission:
N = int(input())

A = list(map(int,input().split()))

if A[0]==0:
    B = [1,-1]
    ANS = [1,1]
else:
    B = [A[0],(-1)*(A[0])//abs(A[0])]
    ANS = [0,abs(A[0])+1]

#print(b)
for i in range(len(B)):
    b = B[i]
    for a in A[1:]:
        #print("a+b"+str(a+b))
        if a+b==0:
            ANS[i] += 1
            b = (-1)*(b)//abs(b)
        elif b*(a+b)<0:
            b += a
        else:
            ANS[i] += abs(a+b)+1
            #print("ans"+str(ans))
            b = (-1)*(a+b)//abs(a+b)
        #print(b)
print(min(ANS))

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

A = list(map(int,input().split()))


B = [A[0],(-1)*(A[0])//abs(A[0])]
ANS = []
#print(b)
for i in range(len(B)):
    b = B[i]
    ans = 0
    if i==1: ans = abs(b)+1
    for a in A[1:]:
        #print("a+b"+str(a+b))
        if a+b==0:
            ans += 1
            b = (-1)*(b)//abs(b)
        elif b*(a+b)<0:
            b += a
        else:
            ans += abs(a+b)+1
            #print("ans"+str(ans))
            b = (-1)*(a+b)//abs(a+b)
        #print(b)
    ANS.append(ans)
print(min(ANS))
Problem p02995 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
all_count = b - a + 1

def f(x, y, z):
    cnt = y // z - x // z
    if x % z == 0:
        cnt += 1
    return cnt

div_c_count = f(a, b, c)
div_d_count = f(a, b, d)

import fractions
lcm = c * d // fractions.gcd(c, d)
cm_count = f(a, b, lcm)

print(all_count - (div_c_count + div_d_count - cm_count))

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
all_count = b - a + 1

def f(x, y, z):
    cnt = y // z - x // z
    if x % z == 0:
        cnt += 1
    return cnt

div_c_count = f(a, b, c)
div_d_count = f(a, b, d)

import math
lcm = c * d // math.gcd(c, d)
cm_count = f(a, b, lcm)

print(all_count - (div_c_count + div_d_count - cm_count))
Problem p03043 (python)

Fixed submission:
import math

n, k = map(int, input().split())
res = 0

for i in range(1, n + 1):
    if i > k:
        res += 1 / n
    else:
        c = math.ceil(math.log(k / i, 2))
        res += (1 / n) * (0.5 ** c)

print(res)

Buggy submission (verdict: Runtime Error):
import math

n, k = map(int, input().split())
res = 0

for i in range(1, n + 1):
    c = math.ceil(math.log2(k / i))
    res += (1 / n) * (0.5 ** c)

print(res)
Problem p03035 (python)

Fixed submission:
a,b=map(int,input().split())
print([[0,b//2][a>5],b][a>12])

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print([[0,b//2][a>5,b][a>12])
Problem p03109 (python)

Fixed submission:
S=input()
print(["Heisei","TBD"][int(S[5:7]+S[8:10])>430])

Buggy submission (verdict: Runtime Error):
S=input()
print(["Heisei,""TBD"][int(S[5:7]+S[8:10])>430])
Problem p03264 (python)

Fixed submission:
K=int(input())
print(K//2*(K//2+K%2))

Buggy submission (verdict: Runtime Error):
K=int(input())
print(K//2*(K//2+k%2))
Problem p03292 (python)

Fixed submission:
X=list(map(int,input().split()))
print(max(X)-min(X))

Buggy submission (verdict: Runtime Error):
X=map(int,input().split())
print(max(X)-min(X))
Problem p03351 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
print(["No","Yes"][abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d)])

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(["No","Yes"][abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d])
Problem p03377 (python)

Fixed submission:
a,b,x=map(int,input().split())
print(["NO","YES"][a<=x<a+b])

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print(["NO","YES"]][a<=x<a+b])

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print(["NO","YES"]][a>x])
Problem p03415 (python)

Fixed submission:
x=[input() for _ in range(3)]
for i in range(3):
    print(x[i][i],end="")

Buggy submission (verdict: Runtime Error):
x=[input() for _ in range(3)]
for i in range(3):
    print(x[i][i],seq="")
Problem p03477 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
print([["Balanced","Left"][a+b>c+d],"Right"][a+b<c+d])

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print([["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d])

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
[["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d]
Problem p03657 (python)

Fixed submission:
a,b=map(int,input().split())
print(["Possible","Impossible"][a%3==b%3 and (a%3==1 or a%3==2)])

Buggy submission (verdict: Runtime Error):
a,b=map(int(input()).split())
print(["Possible","Impossible"][a%3==b%3 and (a%3==1 or a%3==2)]

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(["Possible","Impossible"][a%3==b%3 and (a%3==1 or a%3==2)]

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(["Possible","Impossible"][a%3==b%3 and a%3==1 or a%3==2]
Problem p03711 (python)

Fixed submission:
x,y=map(int,input().split())
s1={1,3,5,7,8,10,12}
s2={4,6,9,11}
print(["No","Yes"][(x in s1 and y in s1) or (x in s2 and y in s2)])

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
G=121313113131
print(["No","Yes"][G[x-1]==G[y-1]])
Problem p03852 (python)

Fixed submission:
s=input()
print(["consonant","vowel"][s=="a" or s=="i" or s=="u" or s=="e" or s=="o"])

Buggy submission (verdict: Runtime Error):
s=input()
print(["vowel","consonant"][s="a" or s="i" or s="u" or s="e" or s="o"])
Problem p03962 (python)

Fixed submission:
print(len(set(input().split())))

Buggy submission (verdict: Runtime Error):
print(len(set([input() for i in range(3)])))