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

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
A,B,C = [int(x) for x in input().split()]

if A<B:
    if A<C and C<B:
        print("Yes")
    else:
        print("No")
else:
    if B<C and C<A:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
S = list(input())
K = int(input())
a = S[K-1]
ans = []
for k in S:
    if k != a:
        ans.append("*")
    else:
        ans.append(k)

answer = "".join(ans)
print(answer)
Problem p03071 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
A, B = [int(x) for x in input().split()]
if A>B:
  ans = A + A-1
elif B>A:
  ans = B+B-1
else:
  ans = 2*A

print(ans)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
Hlist = [int(x) for x in input().split()]

count = 0
for i in range (N):
    if Hlist[i] >= max(Hlist[0:i+1]):
        count+= 1

print(count)
Problem p03076 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))
ls2 = [i%10 for i in ls]
if ls2 == [0,0,0,0,0]:
    print(sum(ls))
else:
    lasttime = 10
    for a in ls:
        b = a%10
        if b < lasttime and b != 0:
            lasttime = b
            ans =a

    ls.remove(ans)
    sum =0
    for i in ls:
        if i%10 ==0:
            sum +=i
        else:
            p = i//10
            sum += (p+1)*10

    print(int(sum + ans))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))

lasttime = 10
for a in ls:
    b = a%10
    if b < lasttime and b != 0:
        lasttime = b
        ans =a

ls.remove(ans)
sum =0
for i in ls:
    if i%10 ==0:
        sum +=i
    else:
        p = i//10
        sum += (p+1)*10

print(int(sum + ans))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))

lasttime = 10
for a in ls:
    b = a%10
    if b < lasttime:
        lasttime = b
        ans =a

ls.remove(ans)
sum =0
for i in ls:
    if i%10 ==0:
        sum +=i
    else:
        p = i//10
        sum += (p+1)*10

print(int(sum + ans)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))

lasttime = 10
for a in ls:
    b = a%10
    if b < lasttime:
        lasttime = a

ls.pop(a)
sum =0
for i in ls:
    if i%10 ==0:
        sum +=i
    else:
        p = i//10
        sum += (p+1)*10

print(sum)
Problem p03079 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
A,B,C = [int(x)for x in input().split()]
if A == B == C:
    print("Yes")
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
A,B,C = [int(x)for x in input().split]
if A == B == C:
    print("Yes")
else:
    print('No')
Problem p03086 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
clst=[]
count = 0
for s in S:
    if s == 'A' or s == 'T' or s =='C' or s == 'G':
        count += 1
        clst.append(count)
    else:
        
        count = 0
        clst.append(count)
print(max(clst))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
ls =[]
count = 0
for a in S:
    
    if a == 'A' or a =='T' or a == 'C' or a =='G':
        count += 1
    else:
        ls.append(count)
        count = 0

print(max(ls))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
ls =[]
count = 0
for i in range(len(S)):
    
    if S[i] == 'A' or S[i] =='T' or S[i] == 'C' or S[i] =='G':
        count += 1
    else:
        ls.append(count)
        count = 0

print(max(ls))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
ls =[]
count = 0
for i in range(len(S)):
    
    if S[i] == 'A' or 'T' or 'C' or'G':
        count += 1
    else:
        ls.append(count)
        count = 0

print(max(ls))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
ls =[]
count = 0
for i in range(len(S)):
    
    if S[i] in 'ATGC':
        count += 1
    else:
        ls.append(count)
        count = 0

print(max(ls))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
ls =[]
count = 0
for i in len(S):
    
    if S[i] in 'ATGC':
        count += 1
    else:
        ls.append(count)
        count = 0

print(max(ls))
Problem p03087 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N,Q = [int(x) for x in input().split()]
S = list(input())
lrlist =[]
for _ in range(Q):
    l,r = [int(x) for x in input().split()]
    lrlist.append((l,r))

sumls =[0]*(N+1)
for i in range (N-1):
    if S[i] == 'A' and S[i+1] == 'C':
        sumls[i+1] = sumls[i] + 1
    else:
        sumls[i+1] = sumls[i]

for _ in range (Q):
    l = lrlist[_][0]
    r = lrlist[_][1]
    ans = sumls[r-1]-sumls[l-1]
    print(ans)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N,Q = [int(x) for x in input().split()]
S = list(input())
lrlist =[]
for _ in range(Q):
    l,r = [int(x) for x in input().split()]
    lrlist.append((l,r))

sumls =[0]*(N+1)
for i in range (N-1):
    if S[i] == 'A' and S[i+1] == 'C':
        sumls[i+1] = sumls[i] + 1
    else:
        sumls[i+1] = sumls[i]

for _ in range (Q):
    l = lrlist[_][0]
    r = lrlist[_][1]
    ans = sum(sumls[r-1]-sumls[l-1])
    print(ans)
Problem p03101 (python)

Fixed submission:
K,W = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
print ((K-h)*(W-w))

Buggy submission (verdict: Runtime Error):
K,w = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
print (K*W -(K-h)*(W-w))
Problem p03106 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i for i in range(1,A+1) if A % i == 0 and B % i == 0]
ls.reverse()
answer = ls[K-1]
print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i for i in range(1,A+1) if A % i == 0 and B % i == 0]
lsreverse = reverse(ls)
answer = lsreverse[K-1]
print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i for i in range(1,A+1) if A % i == 0 and B % i == 0]
answer = ls[K]
 print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i for i in range(1,A+1) if A % i == 0 and B % i == 0]
print(ls[K])

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i in range(1,A+1) if A % i == 0 and B % i == 0]
print(ls[K])

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[]
for i in range(1,A+1):
    if A % i == 0 and B % i == 0:
        ls.append(i)

print(ls[K])
Problem p03109 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

S = input()
ls = [x for x in S.split("/")]
y = int(ls[0])
m = ls[1]
if y<=2018:
    a = "Heisei"
elif y == 2019 and m in ["01" ,"02", "03","04"]:
    a = "Heisei"
else:
    a = "TBD"
print(a)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

S = input()
y, m, d = [int(x) for x in S.split('/')]
if y>=2020:
    answer = "Heisei"
elif:
    y = 2019 and m >= 5:
    answer = "Heisei"
else:
    answer = "TBD"
Problem p03110 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())

answer = 0
for _ in range(N):
    x,u = input().split()
    if u == "JPY":
        money = float(x) 
    else:
        money = float(x)*380000.0
    answer += money
print(answer)

Buggy submission (verdict: Runtime Error):
v
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())

answer = 0
for _ in range(N):
    x,u = input().split()
    if u == "JPY":
        money = int(x) 
    else:
        money = float(x)*380000.0
    answer += money
print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())

answer = 0
for _ in range(N):
    x,u = input().split(" ")
    if u == JPY:
        money = float(x) 
    else:
        money = float(x)*380000
    answer += money
print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())

answer = 0
for _ in range(N):
    x,u = input().split()
    if u == JPY:
        money = float(x) 
    else:
        money = float(x)*380000
    answer += money



print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
xls = []
uls = []
answer = 0
for _ in range(N):
    x,u = input().split()
    if u == JPY:
        money = int(x) 
    else:
        money = float(x)*380000
    answer += money



print(answer)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
xls = []
uls = []
for _ in range(N):
    x,u = input().split()
    if u == JPY:
        x = int(x)
    else:
        x = float(x)
    xls.append(x)
    uls.append(u)

answer = 0
for i in range(N):
    if uls[i] == JPY:
        money = xls[i]
    else:
        money = xls[i]*380000
    answer += money

print(answer)
Problem p03136 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
Llist = [int(x) for x in input().split()]
Llist.sort()
Llist.reverse()
if sum(Llist) > 2*Llist[0]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum(sorted([int(x) for x in input().split()]) > 2*sorted([int(x) for x in input().split()][-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum(sorted([int(x) for x in input().split()]) > 2*Llist[-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum([int(x) for x in input().split()].sort()) > 2*Llist[-1]:
    print("Yes")
else:
    print("No")
Problem p03145 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

ls = [int(x) for x in input().split()]
ls.sort()
print(int((ls[0]*ls[1])/2))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

ls = [int(x) for x in input().split()]
ls.sort()
print(int((ls[0]*ls[1])/2)
Problem p03146 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

s = int(input())

ls =[s]
while True:
    if ls[-1] % 2 ==0:
        a = int(ls[-1]/2)
    else:
        a = int(ls[-1]*3 + 1)
    
    if a in ls:
        break
    else:
        ls.append(a)

print(len(ls)+1)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

s = int(input())

ls =[s]
while True:
    if ls[-1] % 2 ==0:
        a = ls[-1]/2
    else:
        a = ls[-1]*3 + 1
    if a in ls:
        break
    else:
        ls.append(a)

print(lsn(ls))
Problem p03211 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())

sublist = []
for i in range(len(S)-2):
    num =  int("".join(S[i:i+3]))
    sublist.append(abs(num-753))

print(min(sublist))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())

sublist = []
for i in range(len(S)-2):
    num =  int("".join(S[i:i+3]))
    sublist.append(abs(num-754)

print(min(sublist))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())

sublist = []
for i in range(len(s)-2):
    num =  int("".join(S[i:i+3]))
    sublist.append(num)

print(min(sublist))
Problem p03212 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())

def dfs(s):
    if int(s) > N:
        return 0
    ret =1 if all (s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs (s+c)
    return ret

print(dfs('0'))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
ls = [x+1 for x in range(N)]
candidates = [str(x) for x in ls if "7" in str(x) and "5" in str(x) and "3" in str(x)]
count = 0
for _ in range len(candidates):
    candlist = list(candidates)
    ls2 = [x for x in candlist if x != "7" and x != "5"and x != "3"]
    if ls2 is False:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
ls = [x+1 for x in range(N)]
candidates = [str(x) for x in ls if "7" in str(x) and "5" in str(x) and "3" in str(x))
count = 0
for _ in range len(candidates):
    candlist = list(candidates)
    ls2 = [x for x in candlist if x != "7" and x != "5"and x != "3"]
    if ls2 is False:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
ls = [x+1 for x in range(N)]
candidates = [str(x) for x in ls if "7" in str(x) and "5" in str(x) and "3" in str(x))
count = 0
for _ in range len(candidates):
    candlist = list(candidates)
    ls2 = [x for x in candlist if x != 7 and x != 5 and x != 3]
    if ls2 is False:
        count += 1

print(count)
Problem p03238 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
if N == 1:
    print('Hello World')
else:
    A,B = [int(input()),int(input())]
    print(A +B)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N == 1:
  print("Hallo World")
else:
  list = []
  for _ in range(N)
  list.append(int(input()))
  A,B = list
  print(A+B)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N == 1:
  print("Hallo World")
  else:
    list = []
    for _ in range(N):
      list.append(int(input()))
    A,B = list
    print(A+B)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N == 1:
  print("Hallo World")
  else:
    A, B = [int(x) for x in input()]
    print(A+B)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N == 1:
  print("Hallo World")
  else:
    print(int(input()) + int(input()))
Problem p03239 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split()]
cost = []
for _ in range(N):
    c,t = [int(x) for x in input().split()]
    if t <= T:
        cost.append(c)

if cost:
    print(min(cost))
else:
    print("TLE")

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split]
cost = []
for _ in range(N):
    c,t = [int(x) for x in input().split]
    if t <= T:
        cost.append(c)

if cost == True:
    print(min(cost))
else:
    print("TLE")

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split]
cost = []
for _ in range(n):
    c,t = [int(x) for x in input().split]
    if t <= T:
        cost.append(c)

if cost == True:
    print(min(cost))
else:
    print("TLE")
Problem p03261 (python)

Fixed submission:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
wls =[]
for i in range(N):
    wls.append(input())
count =0
if len(wls) != len(set(wls)):
    print('No')
else:
    for i in range(N):
        if i == 0:
            continue
        else:
            if wls[i][0] != wls[i-1][-1]:
                count += 1
            
    if count == 0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
wls =[]
for i in range(N):
    wls.append(input())
count =0
if count(wls) != count(set(wls):
    print('No')
else:
    for i in range(N):
        if i == 0:
            continue
        else:
            if wls[i][0] != wls[i-1][-1]:
                count += 1
            
if count == 0:
    print('Yes')
else:
    print('No')
Problem p04043 (python)

Fixed submission:
a=input().split()
a.sort()
if a[0]=='5' and a[1]=='5' and a[2]=='7':
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N,L=map(int, input().split())
a=[]
for i in range(N):
    a.append(input())
a.sort()
for i in range(N):
    print(a[i],end='')

Buggy submission (verdict: Runtime Error):
N,L=input().split()
N=int(N)
a=[]
for i in range(N):
    s=input()
    a.append(s)
a.sort()
for i in range(N):
    print(a[i],end='')
Problem p03838 (python)

Fixed submission:
x, y = map(int, input().split())

a = abs(abs(x)-abs(y))

if (x < 0 and y <= 0 and abs(x) > abs(y)) or (x >= 0 and y >= 0 and abs(x)<abs(y)):
    b = 0
elif (x < 0 and y > 0) or (x >= 0 and y <= 0):
    b = 1
else:
    b = 2

print(a+b)

Buggy submission (verdict: Runtime Error):
aI, aO, aT, aJ, aL, aS, aZ = map(int, input().split())

if aL%2 and aJ%2:
    print(int((aI-1)/2)*2+aO+int(aJ/2)*2+int(aL/2)*2+3)
else:
    print(int(aI/2)*2+aO+int(aJ/2)*2+int(aL/2)*2)

Buggy submission (verdict: Runtime Error):
aI, aO, aT, aJ, aL, aS, aZ = map(int, input().split())

if aL%2 and aJ%2:
    print(int((aI-1)/2)*2+aO+int(aJ/2)*2+int(aL/2)*2+3)
else:
    print(int(aI/2)*2+aO+int(aJ/2)*2+int(aL/2)*2)
Problem p03244 (python)

Fixed submission:
import collections

def inputN(typ=str):
    return map(typ, raw_input().split())


N = inputN(int)[0]
v = inputN(int)

col0 = collections.Counter(v[::2])
col1 = collections.Counter(v[1::2])
X0 = col0.most_common()
X1 = col1.most_common()
#print X0
#print X1

if X0[0][0] == X1[0][0]:
    if len(X0) == 1 and len(X1) == 1:
        k0 = X0[0][1]
        k1 = 0
    elif len(X0) == 1:
        k0 = X0[0][1]
        k1 = X1[1][1]
    elif len(X1) == 1:
        k0 = X0[1][1]
        k1 = X1[0][1]
    elif X0[1][1] >= X1[1][1]:
        k0 = X0[1][1]
        k1 = X1[0][1]
    elif X0[1][1] < X1[1][1]:
        k0 = X0[0][1]
        k1 = X1[1][1]
else:
    k0 = X0[0][1]
    k1 = X1[0][1]

print N - k0 - k1

Buggy submission (verdict: Runtime Error):
import collections

def inputN(typ=str):
    return map(typ, raw_input().split())


N = inputN(int)[0]
v = inputN(int)

col0 = collections.Counter(v[::2])
col1 = collections.Counter(v[1::2])
X0 = col0.most_common()
X1 = col1.most_common()
#print X0
#print X1

if X0[0][0] == X1[0][0]:
    if len(X0) == 1 and len(X1) == 1:
        k0 = X[0][1]
        k1 = 0
    elif len(X0) == 1:
        k0 = X0[0][1]
        k1 = X1[1][1]
    elif len(X1) == 1:
        k0 = X0[1][1]
        k1 = X1[0][1]
    elif X0[1][1] >= X1[1][1]:
        k0 = X0[1][1]
        k1 = X1[0][1]
    elif X0[1][1] < X1[1][1]:
        k0 = X0[0][1]
        k1 = X1[1][1]
else:
    k0 = X0[0][1]
    k1 = X1[0][1]

print N - k0 - k1

Buggy submission (verdict: Runtime Error):
import collections

def inputN(typ=str):
    return map(typ, raw_input().split())


N = inputN(int)[0]
v = inputN(int)

col0 = collections.Counter(v[::2])
col1 = collections.Counter(v[1::2])
X0 = col0.most_common()
X1 = col1.most_common()
#print X0
#print X1

if X0[0][0] == X1[0][0]:
    if len(X0) == 1 and len(X1) == 1:
        k0 = X[0][1]
        k1 = 0
    elif len(X0) == 1:
        k0 = X0[0][1]
        k1 = X1[1][1]
    elif len(X1) == 1:
        k0 = X0[1][1]
        k1 = X1[0][1]
    elif X0[1][1] >= X1[1][1]:
        k0 = X0[0][1]
        k1 = X1[1][1]
    elif X0[1][1] < X1[1][1]:
        k0 = X0[1][1]
        k1 = X1[0][1]
else:
    k0 = X0[0][1]
    k1 = X1[0][1]

print N - k0 - k1
Problem p03035 (python)

Fixed submission:
A,B = map(int,input().split())
if A <= 5:
  price = 0
elif A >=6 and A <= 12:
  price = B/2
else:
  price = B
print(int(price))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
ListA = list(map(int,input().split()))
dictionary = {}
for i in range(M):
    B,C = map(int,input().split())
    dictionary[C] = B
    
ListA =  sorted(ListA)
dict_keys = sorted(dictionary.keys())
for dict_key in dict_keys:
    for i in range(dictionary[dict_key]):
        if dict_key > ListA[i]:
            ListA[i] = dict_key
        else:
            ListA[i] = ListA[i]
    ListA = sorted(ListA)
print(sum(ListA))

Buggy submission (verdict: Runtime Error):
A,B = int(input().split())
if A <= 5:
  price = B
elif A >=6 and A <= 12:
  price = B/2
else:
  price = B
print(price)

Buggy submission (verdict: Runtime Error):
A,B = int(input().split())
if A <= 5:
  price = B
elif A >=6 and A <= 12:
  price = B/2
else:
  price = B
print(B)
Problem p03238 (python)

Fixed submission:
N = int(input())

if N == 1:
  print("Hello World")
else :
  A = int(input())
  B = int(input())
  print(A + B)

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

if N == 1:
  print("Hello World")
else N == 2:
  A = int(input())
  B = int(input())
  print(A + B)

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

if N == 1:
  print("Hello World")
else if N == 2:
  A = int(input())
  B = int(input())
  print(A + B)

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

if N == 1:
  print("Hello World")
else if N == 2:
  A, B = input() for i in 2
  print(A + B)

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

if N == 1:
  print("Hello World")
else if N == 2:
  A, B = map(int, input().split())
  print(A + B)
Problem p03243 (python)

Fixed submission:
import math
N = int(input())

if N % 111 == 0:
  print (N)
else:
  print((math.floor(N / 111) + 1) * 111 )

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

if N % 111 == 0:
  print (N)
else:
  print((math.floor(N / 111) + 1) * 111 )
Problem p03260 (python)

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

if A*B % 2 == 0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
 
W = [[list(input())]]
 
def shiritori(N):
  for i in range(N):
    if any(W[i]):
      return "No"
    else:
    	if W[i-1][-1] == W[i][0]:
          return "Yes"
    	else:
          return "No"
    

        
print(shiritori(N))
Problem p03262 (python)

Fixed submission:
import fractions
from functools import reduce
 
N, X = map(int, input().split())
 
L = []

def minus_X(n):
  return abs(n - X)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

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

L2 = map(minus_X, L)
 
print(gcd_list(L2))

Buggy submission (verdict: Runtime Error):
import math

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

L = [list(input().split())]

print(math.gcd_list(L))
Problem p03264 (python)

Fixed submission:
K = int(input())
 
if K % 2 == 0:
  print(int(K/2*K/2))
else:
  print(int((K-1)*(K+1)/4))

Buggy submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(int, input().split())

y3 = y2 + x2- x1
y4 = x2 - x1 + y1
x3 = y1 - y2 + x2
x4 = y1 - y2 + x1

print(x3, y3, x4, y4)
Problem p03587 (python)

Fixed submission:
S = int(input())

lst = []
while S > 0:
    lst.append(S%10)
    S //= 10 # 必須
lst.reverse()

print(sum(lst))

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

lst = []
while i > 0:
    lst.append(S%10)
    S //= 10 # 必須
lst.reverse()

print(sum(lst))
Problem p03086 (python)

Fixed submission:
N = list(input())
A = set(list("ACGT"))
ans = [0]
for i in range(len(N)):
    cnt = 0
    for n in N[i:]:
        if n in A:
            cnt += 1
        else:
            break
        ans.append(cnt)
print(max(ans))

Buggy submission (verdict: Runtime Error):
N = input()
A = set(list("ACGT"))
ans = []
for i in range(len(N)):
    cnt = 0
    for n in N[i:]:
        if n in A:
            cnt += 1
        else:
            ans.append(cnt)
            break
print(max(ans))