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

Fixed submission:

s=0
s=input().split()
a=s[0]
b=s[1]
if a=="A":
    a=10
if a=="B":
    a=11
if a=="C":
    a=12
if a=="D":
    a=13

if a=="E":
    a=14
if a=="F":
    a=15

if b=="A":
    b=10
if b=="B":
    b=11
if b=="C":
     b=12
if b=="D":
    b=13

if b=="E":
     b=14
if b=="F":
     b=15

if a>b:
    print(">")
if b>a:
    print("<")
if a==b:
    print("=")

Buggy submission (verdict: Runtime Error):

s=0
s=input().split()
a=s[0]
b=s[1]
if a=="A":
    a=10
if a=="B":
    a=11
if a=="C":
    a=12
if a=="D":
    a=13

if a=="E":
    a=14
if a=="F":
    a=15

if b=="A":
    b=10
if b=="B":
    b=11
if b=="C":
     b=12
if b=="D":
    b=13

if b=="E":
     b=14
 if b=="F":
     b=15

if a>b:
    print(">")
if b>a:
    print("<")
if a==b:
    print("=")

Buggy submission (verdict: Runtime Error):
while True:
    s=0
    s=input().split()
    a=s[0]
    b=s[1]
    if a=="A":
        a=10
    if a=="B":
        a=11
    if a=="C":
        a=12
    if a=="D":
        a=13

    if a=="E":
        a=14
    if a=="F":
        a=15

    if b=="A":
        b=10
    if b=="B":
        b=11
    if b=="C":
        b=12
    if b=="D":
        b=13

    if b=="E":
        b=14
    if b=="F":
        b=15

    if a>b:
        print(">")
    if b>a:
        print("<")
    if a==b:
        print("=")

Buggy submission (verdict: Runtime Error):
while True:
    s=0
    s=input().split()
    a=s[0]
    b=s[1]
    if a=="A":
        a=10
    if a=="B":
        a=11
    if a=="C":
        a=12
    if a=="D":
        a=13

    if a=="E":
        a=14
    if a=="F":
        a=15

    if b=="A":
        b=10
    if b=="B":
        b=11
    if b=="C":
        b=12
    if b=="D":
        b=13

    if b=="E":
        b=14
    if b=="F":
        b=15

    if a>b:
        print(">")
    elif b>a:
        print("<")
    else:
        print("=")

Buggy submission (verdict: Runtime Error):
while True:
    
    a,b= map(int,input().split())
    if a==A:
        a=10
    if a==B:
        a=11
    if a==C:
        a=12
    if a==D:
        a=13

    if a==E:
        a=14
    if a==F:
        a=15

    if b==A:
        b=10
    if b==B:
        b=11
    if b==C:
        b=12
    if b==D:
        b=13

    if b==E:
        b=14
    if b==F:
        b=15

    if a>b:
        print(">")
    elif b>a:
        print("<")
    else:
        print("=")
Problem p02934 (python)

Fixed submission:
if __name__ == "__main__":
    N = int(input())
    s = input().split()
    sum = 0

    for i in range(N):
        sum = sum + 1/(int(s[i]))
    print(1/sum)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction

if __name__ == "__main__":
    count = int(input())
    number_list = map(int, input().split(' '))

    sum = 0
    for number in number_list:
        sum += Fraction(1, number)

    up, down = map(int, str(sum).split('/'))
    print(down / up)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction

count = int(input())
number_list = map(int, input().split(' '))

sum = 0
for number in number_list:
	sum += Fraction(1, number)

up, down = map(int, str(sum).split('/'))
print(down / up)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction

count = int(input())
number_list = map(int, input().split(' '))

sum = 0
for number in number_list:
  sum += Fraction(1, number)

  up, down = map(int, str(sum).split('/'))
  print(down / up)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction

def main():
    count = int(input())
    number_list = map(int, input().split(' '))

    sum = 0
    for number in number_list:
        sum += Fraction(1, number)

    up, down = map(int, str(sum).split('/'))
    print(down / up)        

if __name__ == "__main__":
    main()
Problem p02946 (python)

Fixed submission:
# B - One Clue
def main():
  K, X = map(int, input().split(' '))
  print(*(range((X + 1) - K, (X + K))))

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
  K, X = map(int, input().split(' '))
  print(*(range((X + 1) - K, (X + K))))
Problem p02947 (python)

Fixed submission:
# C - Green Bin
def main():
    count = 0
    dictCount = {}
    for i in [input() for i in range(int(input()))]:
        strInput = ''.join(sorted([c for c in i]))
        if strInput in dictCount:
            count += dictCount[strInput]
            dictCount[strInput] += 1
        else:
            dictCount[strInput] = 1
    print(count)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
# B - One Clue
def main():
    count = int(input())
    data = []
    for i in range(count):
        data.append(''.join(sorted(str(input()))))
    unique = list(set(data))
    sameCount = [0 for i in range(len(unique))]
    for j in range(len(unique)):
        for k in range(count):
            if unique[j] == data[k]:
                sameCount[j] = 1 + sameCount[j]

    print(sum(list(range(sameCount[0]))) + sum(list(range(sameCount[1]))))
        

if __name__ == "__main__":
    main()
Problem p03425 (python)

Fixed submission:
N = int(input())

d = {'M':0,'A':0,'R':0,'C':0,'H':0}

for i in range(N):
    s = input()
    if s[0] in 'MARCH':
        d[s[0]]+=1

v = list(d.values())
ans = 0

for i in range(5):
    for j in range (i+1,5):
        for k in range (j+1,5):
            ans += v[i]*v[j]*v[k]

print(ans)

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

d = {'M':0,'A':0,'R':0,'C':0,'H':0}

for i in range(N):
    s = input()
    if s[0] in 'MARCH':
        d[s[0]]+=1

v = list(d.values())
ans = 0

for i in range(5):
    for j in range (i+1,5):
        for k in range (j+1,5):
            ans += v[i]*v[j]*v[k]

print(ans)

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

d = {'M':0,'A':0,'R':0,'C':0,'H':0}

for i in range(N):
    s = input()
    if s[0] in 'MARCH':
        d[s[0]]+=1

v = list(d.values())
ans = 0

for i in range(5):
    for j in range (i+1,5):
        for k in range (j+1,5):
            ans += v[i]*v[j]*v[k]

print(ans)
Problem p02937 (python)

Fixed submission:
import sys
import bisect

s = input()
t = input()

dic = {}

for i, c in enumerate(s):
    if c not in dic:
        dic[c] = []
        
    dic[c].append(i)

currentIndex = -1
roop = 0

for c in t:
    if c not in dic:
        print(-1)
        sys.exit()
    
    if currentIndex >= dic[c][-1]:
        roop += 1
        currentIndex = dic[c][0]
    else:
        index =  bisect.bisect_right(dic[c], currentIndex)
        currentIndex = dic[c][index]

result = (roop * len(s)) + currentIndex + 1
print(result)

Buggy submission (verdict: Runtime Error):
import bisect

s = input()
t = input()

dic = {}

for i, c in enumerate(s):
    if c not in dic:
        dic[c] = []
        
    dic[c].append(i)

currentIndex = -1
roop = 0

for c in t:
    if c not in dic:
        print(-1)
        SystemExit(0)
    
    if currentIndex >= dic[c][-1]:
        roop += 1
        currentIndex = dic[c][0]
    else:
        index =  bisect.bisect_right(dic[c], currentIndex)
        currentIndex = dic[c][index]

result = (roop * len(s)) + currentIndex + 1
print(result)
Problem p03029 (python)

Fixed submission:
apple, frag = map(int, input().split())
         
pie = ((apple*3) + frag) / 2
         
print(int(pie))

Buggy submission (verdict: Runtime Error):

import copy

class MyClass():

    maxSum = 0

    def do(self, baseList, _temochi, leftIndex, rightIndex, nokoriSousaCount):
        if nokoriSousaCount < 0:
            return

        sum = 0
        for each in _temochi:
            sum += each

        if self.maxSum < sum:
            self.maxSum = sum

        if leftIndex <= rightIndex:
            temochi = copy.copy(_temochi)
            temochi.append(baseList[leftIndex])
            self.do(baseList, temochi, leftIndex + 1, rightIndex, nokoriSousaCount - 1)

            temochi = copy.copy(_temochi)
            temochi.append(baseList[rightIndex])
            self.do(baseList, temochi, leftIndex, rightIndex - 1, nokoriSousaCount - 1)
            
        self.removeMin(_temochi, leftIndex, rightIndex, nokoriSousaCount - 1)

    def removeMin(self, _temochi, leftIndex, rightIndex, nokoriSousaCount):
        if len(_temochi) > 0 and nokoriSousaCount > 0:
            minNum = min(_temochi)
            if minNum < 0:
                temochi = copy.copy(_temochi)
                temochi.remove(minNum)
                self.do(baseList, temochi, leftIndex, rightIndex, nokoriSousaCount)


count, opeCount = map(int, input().split())
baseList = list(map(int, input().split()))

doClass = MyClass()
doClass.do(baseList, [], 0, count - 1, opeCount)

print(doClass.maxSum)

Buggy submission (verdict: Runtime Error):
    apple, frag = map(int, input().split())
     
    pie = ((apple*3) + frag) / 2
     
    print(pie)
Problem p03031 (python)

Fixed submission:
swithCount, lightCount = map(int, input().split())
swithList = [0] * swithCount

for lightIndex in range(lightCount):
    connectedSwitchList = list(map(int, input().split()))
    for si in connectedSwitchList[1:]:
        switchIndex =  si - 1
        swithList[switchIndex] = swithList[switchIndex] | 1 << lightIndex

expectedLightStatusList = list(map(int, input().split()))
expectedLightStatus = 0

for i, eachStatus in enumerate(expectedLightStatusList):
    expectedLightStatus = expectedLightStatus | eachStatus << i

resultCount = 0
for eachSwitchSet in range(1 << swithCount):
    actuallyLightStatus = 0
    for switchIndex in range(swithCount):
        if eachSwitchSet >> switchIndex & 1:
            actuallyLightStatus = actuallyLightStatus ^ swithList[switchIndex]

    if expectedLightStatus == actuallyLightStatus:
        resultCount += 1

print(resultCount)

Buggy submission (verdict: Runtime Error):
swithCount, lightCount = map(int, input().split())
swithList = [0] * lightCount

for i in range(swithCount):
    connectedLightList = list(map(int, input().split()))
    for lightIndex in connectedLightList[1:]:
        lightIndex -= 1
        swithList[i] = swithList[i] | 1 << lightIndex

expectedLightStatusList = list(map(int, input().split()))
expectedLightStatus = 0

for i, eachStatus in enumerate(expectedLightStatusList):
    expectedLightStatus = expectedLightStatus | eachStatus << i

resultCount = 0
for eachSwitchSet in range(1 << swithCount):
    actuallyLightStatus = 0
    for switchIndex in range(swithCount):
        if eachSwitchSet >> switchIndex & 1:
            actuallyLightStatus = actuallyLightStatus ^ swithList[switchIndex]

    if expectedLightStatus == actuallyLightStatus:
        resultCount += 1

print(resultCount)

Buggy submission (verdict: Runtime Error):
swithCount, lightCount = map(int, input().split())
swithList = [0] * lightCount

for i in range(swithCount):
    connectedLightList = list(map(int, input().split()))
    for lightIndex in range(connectedLightList[1:]):
        lightIndex -= 1
        swithList[i] = swithList[i] | 1 << lightIndex

expectedLightStatusList = list(map(int, input().split()))
expectedLightStatus = 0

for i, eachStatus in enumerate(expectedLightStatusList):
    expectedLightStatus = expectedLightStatus | eachStatus << i

resultCount = 0
for eachSwitchSet in range(1 << swithCount):
    actuallyLightStatus = 0
    for switchIndex in range(swithCount):
        if eachSwitchSet >> switchIndex & 1:
            actuallyLightStatus = actuallyLightStatus ^ swithList[switchIndex]

    if expectedLightStatus == actuallyLightStatus:
        resultCount += 1

print(resultCount)
Problem p02934 (python)

Fixed submission:
N = int(input())
A = list(map(float,input().split()))
tmp = 0
for i in range(N):
  tmp = tmp + (1/A[i])
tmp= 1/tmp
print(tmp)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(float,input().split(",")))
tmp = 0
for i in range(N):
  tmp = tmp + 1/A[i]
  
print(1/tmp)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split(",")))
tmp = 0
A.sorted()
for i in range(N):
  tmp = tmp + 1/A[i]
  
print(1/tmp)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split(",")))
tmp = 0
for i in range(N):
  tmp = tmp + 1/A[i]
  
print(1/tmp)
Problem p02997 (python)

Fixed submission:
[N ,K] = list(map(int,input().split()))
max = int((N-1)*(N-2)/2)
if max<K:
    print(-1)
    exit()

tree = []
for i in range(2, N+1):
    tree.append((1,i))
t = 3
a=0
for i in range(0, max-K):
    if i+t-a>N:
        a += i-a
        t+=1 
    tree.append((i+2-a,i+t-a))

print(len(tree))
for i in tree:
    print(str(i[0]) + " " +str(i[1]))

Buggy submission (verdict: Runtime Error):
[N K] = list(map(int,input().split))
max = (N-1)*(N-2)/2
if max<K:
    print(-1)
    exit()

tree = []
for i in range(2, N):
    tree.append(1,N)

for i in range(max-K):
    tree.append(i+2,i+3)

print(max + max-K)
for i in tree:
    print(str(i[0]) + " " +str([1]))

Buggy submission (verdict: Runtime Error):
[N K] = list(map(int,input().split))
max = (N-1)*(N-2)/2
if max<K:
    print(-1)
    sys.exit()

tree = []
for i in range(2, N):
    tree.append(1,N)

for i in range(max-K):
    tree.append(i+2,i+3)

print(max + max-K)
for i in tree:
    print(str(i[0]) + " " +str([1]))
Problem p02996 (python)

Fixed submission:
N = int(input())
ab = [[0, 0]] + [list(map(int, input().split())) for i in range(N)]
ab = sorted(ab, key=lambda x: x[1])
for i in range(len(ab) - 1):
    ab[i + 1][0] += ab[i][0]
    if ab[i + 1][1] < ab[i + 1][0]:
        print("No")
        exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
def qSort(a):
    if len(a) in (0, 1):
        return a

    p = a[-1]
    l = [x for x in a[:-1] if x[1] <= p[1]]
    r = [x for x in a[:-1] if x[1] > p[1]]

    return qSort(l) + [p] + qSort(r)


N = int(input())
ab = [list(map(int, input().split())) for i in range(N)]
ab = qSort(ab)
for i in range(N):
    for j in range(i, N):
        ab[j][1] -= ab[i][0]
        if ab[j][1] < 0:
            print("No")
            exit()
print("Yes")
Problem p03061 (python)

Fixed submission:
from functools import reduce


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


def lcm(a, b):
    return a * b // gcd(a, b)


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

l = [0 for i in range(n)]
for i in range(0, n - 1, 1):
    l[i + 1] = gcd(l[i], a[i])

r = [0 for i in range(n)]
for i in range(n - 2, -1, -1):
    r[i] = gcd(r[i + 1], a[i + 1])

m = [gcd(l[i], r[i]) for i in range(n)]

print(reduce(max, m))

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


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


def lcm(a, b):
    return a * b // gcd(a, b)


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

l = [0 for i in range(n)]
for i in range(0, n - 1, 1):
    l[i + 1] = gcd(l[i], a[i])
    print(l[i + i])

r = [0 for i in range(n)]
for i in range(n - 2, -1, -1):
    r[i] = gcd(r[i + 1], a[i + 1])
    print(r[i])

m = [gcd(l[i], r[i]) for i in range(n)]

print(reduce(max, m))
Problem p03126 (python)

Fixed submission:
N, M = map(int, input().split())
k = [i[1:] for i in [list(map(int, input().split())) for i in range(N)]]
k_1 = [flatten for inner in k for flatten in inner]
count_k = 0
for i in range(1, M + 1):
    if k_1.count(i) == N:
        count_k += 1

print(count_k)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a_k = [list(map(int, input().split())) for i in range(N)]
a_k.sort()

a_non = []
for i in range(1, len(a_k)):
    if len(a_k[0]) <= 1:
        break

    for j in range(1, len(a_k[0])):
        if a_k[0][j] not in a_k[i][1:]:
            a_non.append(j)

for j in range(len(a_non)):
    a_k[0].pop(a_non[j])


print(len(a_k[0]) - 1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a_k = [list(map(int, input().split())) for i in range(N)]
a_k.sort()

for i in range(1, len(a_k)):
    a_non = []
    if len(a_k[0]) <= 1:
        break

    for j in range(1, len(a_k[0])):
        if a_k[0][j] not in a_k[i][1:]:
            a_non.append(j)

    for j in range(len(a_non)):
        a_k[0].pop(a_non[j])


print(len(a_k[0]) - 1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a_k = [list(map(int, input().split())) for i in range(N)]
a_k.sort()

for i in range(1, len(a_k)):
    a_non = []

    for j in range(1, len(a_k[0])):
        if a_k[0][j] not in a_k[i][1:]:
            a_non.append(j)

    for j in range(len(a_non)):
        a_k[0].pop(a_non[j])
    if len(a_k[0]) <= 1:
        break


print(len(a_k[0]) - 1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a_k = [list(map(int, input().split())) for i in range(N)]
a_k.sort()

for i in range(1, len(a_k)):
    a_non = []

    for j in range(1, len(a_k[0])):
        if a_k[0][j] not in a_k[i][1:]:
            a_non.append(j)

    for j in range(len(a_non)):
        a_k[0].pop(a_non[j])
        if len(a_k[0]) <= 1:
            break


print(len(a_k[0]) - 1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a_k = [list(map(int, input().split())) for i in range(N)]
a_k.sort()

for i in range(1, len(a_k)):
    a_non = []

    for j in range(1, len(a_k[0])):
        if a_k[0][j] not in a_k[i][1:]:
            a_non.append(j)

    for j in range(len(a_non)):
        a_k[0].pop(a_non[j])


print(len(a_k[0]) - 1)
Problem p02947 (python)

Fixed submission:
N = int(input())
S = [input() for i in range(N)]

list = {}
for i in S:
  i=''.join(sorted(i))
  if i in list:
    list[i] = list[i] + 1
  else:
    list[i] = 1

count = 0
for i in list.values():
  n = i - 1
  count = count + int(((n * (n + 1)) / 2))
  
print(count)

Buggy submission (verdict: Runtime Error):
word_dict={}
for word in S:
  word=''.join(sorted(word))
  if word in word_dict.keys() and word_dict[word]==0:#2nd
    word_dict[word] = word_dict[word]+1
  elif word in word_dict.keys() and word_dict[word]==1:#3rd
    word_dict[word]= word_dict[word]+2
  elif word in word_dict.keys() and word_dict[word]==3:#4th
    word_dict[word]= word_dict[word]+3
  elif word in word_dict.keys() and word_dict[word]==6:#5th
    word_dict[word]= word_dict[word]+4
  elif word in word_dict.keys() and word_dict[word]==10:#6th
    word_dict[word]= word_dict[word]+5
  elif word in word_dict.keys() and word_dict[word]==15:#7th
    word_dict[word]= word_dict[word]+6
  else:
    word_dict[word] = 0
print(word_dict)
Problem p02953 (python)

Fixed submission:
N=int(input())
H=list(map(int,input().split(" ")))

for i in reversed(range(N - 1)):
  if H[i + 1] - H[i] == -1:
    H[i] -= 1
  elif H[i + 1] - H[i] < -1:
        print('No')
        exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
for i in range(len(S)):
  bottom_num=S[i-1]
  try:
    if S[i]<=S[i+1]:
      pass
    elif S[i]-1==S[i+1]:
      S[i]-=1  
      if S[i]<bottom_num:
        indication=False
        break      
    else: 
      indication=False
      break
  except:
    pass
print(S)
if indication:
  print("Yes")
else:
  print("No")
Problem p03068 (python)

Fixed submission:
n = int(input())
s = input()
k = int(input())

str_list = list(s)
x = str_list[k-1]
for i in range(len(s)):
    if str_list[i] != x:
        str_list[i] = "*"
str_changed = "".join(str_list)
print(str_changed)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
k = int(input())

str_list = list(s)
x = str_list[k]
for i in range(len(s)):
    if str_list[i] != x:
        str_list[i] = "*"
str_changed = "".join(str_list)
print(str_changed)
Problem p03079 (python)

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

if a == b == c:
    print("Yes")
else:
    print("No")

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

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

masu = np.ones(n+2)
def my_index_multi(l, x):
    return [i+1 for i, _x in enumerate(l) if _x == x]

for i in range(q):
    t, d = map(str, input().split())
    
    index = my_index_multi(s, t)

    if d == "R":
        tmp = masu[index]
        masu[index] = 0
        t_index = list(map(lambda x: x + 1, index))
        masu[t_index] += tmp
    else:
        tmp = masu[index]
        masu[index] = 0
        t_index = list(map(lambda x: x - 1, index))
        masu[t_index] += tmp       

print(int(np.sum(masu[1:n+1])))
Problem p02981 (python)

Fixed submission:
i = input().split(" ")
people = int(i[0])
train_fee = int(i[1])
taxi_fee = int(i[2])

train_sum = people * train_fee
if train_sum > taxi_fee:
    print(taxi_fee)
else:
    print(train_sum)

Buggy submission (verdict: Runtime Error):
i = input().spli(" ")
people = int(i[0])
train_fee = int(i[1])
taxi_fee = int(i[2])

train_sum = people * train_fee
if train_sum > taxi_fee:
    print(train_sum)
else:
    print(taxi_fee)
Problem p02988 (python)

Fixed submission:
n = int(input())
seq_str = input().split(" ")
seq = [int(s) for s in seq_str]
counter = 0

for i in range(1,n-1):
    if (seq[i-1]-seq[i])*(seq[i+1]-seq[i]) < 0:
        counter += 1
print(counter)

Buggy submission (verdict: Runtime Error):
n = int(input())
seq_str = input().split(" ")
seq = [int(s) for s in seq_str]
counter = 0

for i in range(1,n-1):
    if seq[i-1] < sqe[i] and seq[i] < seq[i+1]
    counter =+ 1
print(counter)
Problem p03000 (python)

Fixed submission:
i = input().split(" ")
n = int(i[0])
x = int(i[1])
l = input().split(" ")
height = 0
count = n+1

for i in range(n):
    if (height + int(l[i]) <= x):
        height += int(l[i])
    else:
        count = i + 1
        break

print(count)

Buggy submission (verdict: Runtime Error):
i = input().split(" ")
n = int(i[0])
x = int(i[1])
l = input().split(" ")
height = 0
count = 0

while height <= x and count < n+1:
    height += int(l[count])
    count += 1

print(count)

Buggy submission (verdict: Runtime Error):
i = input().split(" ")
n = int(i[0])
x = int(i[1])
l = input().split(" ")
height = 0
count = 0

while height <= x:
    height += int(l[count])
    count += 1

print(count)
Problem p03085 (python)

Fixed submission:
s = input()
if s == "A":
    print("T")
elif s == "T":
    print("A")
elif s == "C":
    print("G")
else:
    print("C")

Buggy submission (verdict: Runtime Error):
s = input()
if s == "A":
    print("T")
elif s == "T":
    print("A")
elif s == "C":
    print("G")
else:
    print("C")

Buggy submission (verdict: Runtime Error):
s = input()
if s == "A":
    print("T")
elif: s == "T":
    print("A")
elif s == "C":
    print("G")
else:
    print("C")
Problem p03086 (python)

Fixed submission:
s = input()
correct_list = ["A","C","G","T"]
x_list = [-1]

for i, c in enumerate(s):
    if c not in correct_list:
        x_list.append(i)
x_list.append(len(s))
diff_list = []
for i in range(len(x_list)-1):
    diff_list.append(x_list[i+1]-x_list[i])
print(max(diff_list)-1)

Buggy submission (verdict: Runtime Error):
s = input()
correct_list = ["A","C","G","T"]
x_list = [-1]

for i, c in enumerate(s):
    if c not in correct_list:
        x_list.append(i)
diff_list = []
for i in range(len(x_list)-1):
    diff_list.append(x_list[i+1]-x_list[i])
print(max(diff_list)-1)
Problem p03280 (python)

Fixed submission:
l = [int(i) for i in input().split(" ")]
print((l[0]-1)*(l[1]-1))

Buggy submission (verdict: Runtime Error):
l = [int(i) for i in input().split(" ")]
print((l[0]-1)*(l[1]-1))
l = [int(i) for i in input().split(" ")]
print((l[0]-1)*(l[1]-1))
Problem p03243 (python)

Fixed submission:
import sys
import math
 
N = sys.stdin.readline().strip()
N = int(N)
 
M = math.ceil(N / 111.0)
M = int(M * 111)

print(M)

Buggy submission (verdict: Runtime Error):
import sys

N = sys.stdin.readline().strip()
N = int(N)

M = math.ceil(N / 111.0)
M = int(M * 111)


print(M)