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

Fixed submission:
A,B,T = [int(x) for x in input().split()]

print(int((T+0.5)/A)*B)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(x) for x in input().split()]
seki = 1

for x in range(2,int(1000000000**0.5)+1):
    count = 0

    for y in range(N):
        if A[y] % x != 0:
            count += 1
        if count >= 2:
            break
    else:
        seki = x

for i in range(N):
    count = 0
    if A[i] < 1000000000**0.5+1:
        break
    for j in range(N):
        if A[i] % A[j] != 0:
            count += 1
        if count >= 2:
            break
    else:
        seki = A[i]

print(seki)

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



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

N = int(input())
A = [int(x) for x in input().split()]
list = []
max = 1

for x in range(N):

    for y in range(N):
        if x != y:
            list.append(A[y])

    gcd = gcd_list(list)
    if gcd > max:
        max = gcd

print(max)
Problem p03067 (python)

Fixed submission:
A,B,C = [int(x) for x in input().split()]

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

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
count = 0
count2 = 0
flag = False
for x in range(N):
    if S[x] == '#':
        flag = True
    if S[x] == '.' and flag == True:
        count += 1

flag = False

for x in range(N)[::-1]:
    if S[x] == '.':
        flag = True
    if S[x] == '#' and flag == True:
        count2 += 1

print(min(count,count2))
Problem p03076 (python)

Fixed submission:
import math

list = []
indent = 0
memory = 9
for i in range(5):
  list.append(int(input()))
  if memory > list[i] % 10 and list[i] % 10 > 0:
    indent = i
    memory = list[i] % 10

count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * math.ceil(list[i]/10)

print(count)

Buggy submission (verdict: Runtime Error):
list = []
indent = 0
memory = 9
for i in range(5):
  list.append(int(input()))
  if memory > list[i] % 10 and list[i] % 10 > 0:
  	indent = i
    memory = list[i] % 10
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

Buggy submission (verdict: Runtime Error):
list = []
indent = 0
for i in range(5):
  memory = 9
  list.append(int(input()))
  if memory > list[i] % 10 and list[i] % 10 > 0:
  	indent = i
    memory = list[i]
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

Buggy submission (verdict: Runtime Error):
list = []
indent = 0
for i in range(5):
  memory = 9
  list.append(int(input()))
  if memory > list[i] % 10 && list[i] % 10 != 0:
  	indent = i
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)
Problem p03085 (python)

Fixed submission:
a = input()
b = {"A" : "T", "G" : "C", "T" : "A", "C" : "G"}

print(b[a])

Buggy submission (verdict: Runtime Error):
a = input(b)
b = {"A" : "T", "G" : "C", "T" : "A", "C" : "G"}

print(c[b])
Problem p03126 (python)

Fixed submission:
n, m = map(int,input().split())

li = []
for i in range(n):
    x = map(int,input().split())
    li.append(list(x)[1:])
#    print(li)


sumnum = 0 
for i in range(1, m+1):
    num = 0 
    for j in range(n):
        if i not in li[j]:
            num=0
            break
        num = 1 

    if num == 1:
        sumnum+=1
print(sumnum)

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

li = []
for i in range(n):
    x = map(int,input().split())
    li.append(list(x)[1:])
#    print(li)


sumnum = 0 
for i in range(1, m+1):
    num = 0 
    for j in range(n):
        if i not in li[j]:
            num=0
            break
        num = 1 

    if num == 1:
        sumnum+=1
print(sumnum)
~                                                                                                                                                                                                           
~                                                                                                                                                                                                           
~
Problem p02999 (python)

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

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

if s[0] < s[1]:
    print(0)
else:
    print(10)

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

s = list(map(int, input().split()))
N = s[0]
K = s[1]
a = np.array(list(map(int, input().split())))


def judge():
    if l == -1:
        psum = cumsum[r]
    else:
        psum = cumsum[r] - cumsum[l]
    #print(l,r,psum)
    if psum >= K:
        return True
    else:
        return False


counter = 0
cumsum = np.cumsum(a)

for i in range (N):
    r = i
    l = -1
    while judge():  
        counter += 1
        if l == r:
            continue
        else:
            l += 1
    else:
        pass

print(counter)
Problem p03000 (python)

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

s = list(map(int,input().split()))
N = s[0]
X = s[1]

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

counter = 1
coordinate = 0


for i in range(N):
    coordinate += L[i] #次に跳ねる座標
    if coordinate > X:
         break
    counter += 1


print(counter)

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

s = list(map(int,input().split()))
N = s[0]
X = s[1]

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

counter = 0
coordinate = 0
i = 0
while(coordinate <= X and counter < N+1):
    counter += 1
    coordinate += L[i]
    i += 1

print(counter)

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

s = list(map(int,input().split()))
N = s[0]
X = s[1]

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

counter = 0
coordinate = 0
i = 0
while(coordinate <= X):
    counter += 1
    coordinate += L[i]
    i += 1

print(counter)
Problem p02811 (python)

Fixed submission:
K, X = map(int, input().split())
k = K * 500
if k >= X:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
print(S.count('ABC'))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
print(S.count('ABC'))

Buggy submission (verdict: Runtime Error):
K = int(input())
X = int(input())
k = K * 500
if k > X:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
K = int(input())
X = int(input())
k = K * 500
if k > X:
  print('Yes')
else:
  print('No')
Problem p02780 (python)

Fixed submission:
def K(n):
    return 0.5 * (n + 1)

def d():
    n, k = list(map(int, input().split()))
    p = list(map(int, input().split()))

    pionta = None
    ire = [None for i in range(k)]
    d = {}
    d[0] = 0

    ss = 0
    for i in range(0, n):
        if k < i + 1:
            pionta = i % k
        if pionta is None:
            ire[i] = p[i]
        else:
            ss += p[i] - ire[pionta]
            d[ss] = i
            ire[pionta] = p[i]


    max_s = max(d.keys())
    i = d[max_s]
    m = 0
    for i2 in range(i-k+1, i+1):
        m += K(p[i2])
    return m
print(d())

Buggy submission (verdict: Runtime Error):
def K(n):
    return 0.5 * (n + 1)

def d():
    n, k = list(map(int, input().split()))
    p = list(map(int, input().split()))

    pionta = None
    ire = [None for i in range(k)]
    for i in range(0, n):
        if k < i + 1:
            pionta = i // k
        if pionta is None:
            ire[i] = p[i]
        else:
            if ire[pionta] < p[i]:
                ire[pionta] = p[i]
    m = 0
    for i in ire:
        m += K(i)
    return m
print(d())
Problem p02780 (python)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

expectedList = [(1 + s) /  2 for s in p]
cumsum = sum(expectedList[:K])
confirm_cumsum = cumsum

for i in range(K, N):
    cumsum += expectedList[i]
    cumsum -= expectedList[i - K]
    if cumsum > confirm_cumsum:
        confirm_cumsum = cumsum

print(confirm_cumsum)

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

calRes = 0
calIndex = 0
expectedList = []
expectedCorList = []

for i in range(N):
    cal = list(range(1, p[i] + 1))
    expectedList.append(sum(cal) * (1 / len(cal)))

    calTemp = sum(expectedList[i:i + K])
    if calRes < calTemp:
       calRes = calTemp
       calIndex = i

for l in range(K):
    expectedCorList.append(expectedList[calIndex + l])

calCor = sum(expectedCorList)
print(calCor)

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

calEnd = N - 2
calCount = 0
calRes = 0
calIndex = 0
calCor = 0
calList = []
Counter = 0

for i in range(N - 2):
    calTemp = p[i] + p[i + 1] + p[i + 2]
    if calRes <= calTemp:
       calRes = calTemp
       calIndex = i
    
    calCount += 1

for o in range(K):
    cal = list(range(1, p[calIndex + Counter] + 1))
    Counter += 1
    calList.append(sum(cal) * (1 / len(cal)))

calCor = sum(calList)
print(calCor)
Problem p02784 (python)

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

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

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

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
H, N = input().split()
A = list(input().split())

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
H, N = input().split()
A = []
A = input().split()

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
H, N = input().split()
A = input().split()

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")
Problem p02786 (python)

Fixed submission:
H = int(input())

num = 1
res = 1

if H > 1:
    while (num * 2) <= H:
        num = num * 2
        res = num * 2 - 1

print(res)

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

num = 1
res = 1

if H > 1:
    while (num * 2) <= H:
        num = num * 2
        res = num * 2 - 1

print(res)
Problem p02789 (python)

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

Cor = int(N)-int(M)
if Cor == 0:
    print("Yes")
else:
    print("No")

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

Cor = N-M
if Cor == 0:
    print("yes")
else:
    print("no")

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

Cor = N-M
if Cor == N:
    print("yes")
else:
    print("no")
Problem p02780 (python)

Fixed submission:
N, K = (int(x) for x in input().split())
P = [int(x) for x in input().split()]

# (n*(n+1))/2 /n == (n+1)/2

P2 = [(n+1) for n in P]

S = sum(P2[:K])
max_s = S
for i in range(1, N-K+1):
    S -= P2[i-1]
    S += P2[i+K-1]

    max_s = max(max_s, S)

# print(f'{max_s:.9f}')
print('{:.10f}'.format(max_s/2))

Buggy submission (verdict: Runtime Error):
N, K = (int(x) for x in input().split())
P = [int(x) for x in input().split()]

P2 = [(n*(n+1))/2/n for n in P]

S = sum(P2[:K])
max_s = S
for i in range(1, N-K):
    S -= P2[i-1]
    S += P2[i+K]

    max_s = max(max_s, S)

print(f'{max_s:.9f}')
Problem p02778 (python)

Fixed submission:
S=input()
for i in range(len(S)):
  print("x",end="")

Buggy submission (verdict: Runtime Error):
S=input()
for i in range(len(S)):
  print("x",enmd="")
Problem p02801 (python)

Fixed submission:
import string
C=input()
for i in range(len(string.ascii_lowercase)):
  if(string.ascii_lowercase[i]==C):
    print(string.ascii_lowercase[i+1])

Buggy submission (verdict: Runtime Error):
C=input()
for i in range(len(string.ascii_lowercase)):
  if(string.ascii_lowercase[i]==C):
    print(string.ascii_lowercase[i+1])
Problem p02811 (python)

Fixed submission:
K,X=map(int,input().split())
if(500*K>=X):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
K,X=map(int,input().split())
if(500*K>=X):
  print("Yes")
else:
  print("No)
Problem p02814 (python)

Fixed submission:
import fractions
from functools import reduce
import math
import sys

def num_double(n):
	return int(n/2)

def main():
  N,M=map(int,input().split())
  numList=list(map(int,input().split()))
  numList=list(map(num_double,numList))
  numList=list(set(numList))
  
  count=0
  flag=0
  finFlag=0
  evenCount=0
  
  while flag==0:
    evenCount=0
    for i in range(len(numList)):
      if(numList[i]%2==0):
        evenCount+=1
    if(evenCount==len(numList)):
      numList=list(map(num_double,numList))
      M=math.floor(M/2)
    elif(evenCount==0):
      flag=1
    else:
      flag=1
      finFlag=1
  
  if(finFlag==1):
    print(count)
    sys.exit()
  
  else:
    def lcm_base(x, y):
        return (x * y) // fractions.gcd(x, y)

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

    endFlag=0
    nowMagnification=1
    nowNum=0
    startNum=lcm_list(numList)

    while endFlag==0:
      nowNum=startNum*nowMagnification
      if(1<=nowNum)and(nowNum<=M):
        count+=1
        nowMagnification+=2
        continue
      else:
        endFlag=1

    print(count)


if __name__ == '__main__':
    main()

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

def num_double(n):
	return int(n/2)

def main():
  N,M=map(int,input().split())
  numList=list(map(int,input().split()))
  numList=list(map(num_double,numList))
  numList=list(set(numList))
  
  flag=0
  finFlag=0
  evenCount=0
  
  while flag==0:
    evenCount=0
    for i in range(len(numList)):
      if(numList[i]%2==0):
        evenCount+=1
        M=math.floor(M/2)
    if(evenCount==len(numList)):
      numList=list(map(num_double,numList))
    elif(evenCount==0):
      flag=1
    else:
      flag=1
      finFlag=1
  
  if(finFlag==1):
    print("0")
    sys.exit()
  
  def lcm_base(x, y):
      return (x * y) // fractions.gcd(x, y)

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

  endFlag=0
  count=0
  nowMagnification=1
  nowNum=0
  startNum=lcm_list(numList)
  
  else:
    while endFlag==0:
      nowNum=startNum*nowMagnification
      if(1<=nowNum)and(nowNum<=M):
        count+=1
        nowMagnification+=2
      else:
        endFlag=1

  print(count)


if __name__ == '__main__':
    main()
Problem p02817 (python)

Fixed submission:
s=input().split()
print("{}{}".format(s[1],s[0]))

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if(k>a):
  a=0
  k=k-a
  if(k>=b):
    b=0
  else:
    b=b-k
else:
  a=a-k

print("{} {}".format(a,b))

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))
Problem p03494 (python)

Fixed submission:
num=int(input())
fig=list(map(int,input().split()))
 
Even_flag=0
count=0
 
while Even_flag==0:
  for i in range(num):
    if fig[i]%2==1:
      Even_flag=1
      break
    else:
      fig[i]=fig[i]/2
      if i==num-1:
        count+=1
        
print(count)

Buggy submission (verdict: Runtime Error):
num=int(input())
fig=list(map(int,input().split()))
 
Even_flag=0
count=0
 
while Even_flag=0:
  for i in range(num):
    if fig[num]%2==1:
      Even_flag==1:
      break
    else:
      fig[num]=fing[num]/2
      if i==num-1:
        count+=1
  
print(count)

Buggy submission (verdict: Runtime Error):
num=int(input())
fig=list(map(int,input().split()))

Even_flag=0
count=0

while Even_flag=0:
  for i in range(num):
    if fig[num]%2==1:
      Even_flag==1:
      break
    else:
      fig[num]=fing[num]/2
  count+=1
  
print(count)
Problem p02789 (python)

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

if N == M:
    print("Yes")

else:
    print("No")

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

if N == M:
    print("Yes")

else:
    print("No")

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

if N = M:
    print("Yes")

else:
    print("No")
Problem p02969 (python)

Fixed submission:
a = int(input())

print(3*a*a)

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

print(3*a*a)
Problem p03035 (python)

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

if A >= 13:
    print(B)
elif A >= 6:
    print(B//2)
else:
    print(0)

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

if A >= 13:
    print(B)
elif A >= 6:
    print(B//2)
else:
    print(0)
Problem p04029 (python)

Fixed submission:
N = int(input())

ans = 0

for i in range(1, N+1):
    ans +=i

print(ans)

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

ans = 0

for(i = 1; i <= N; i++):
    ans +=1

print(i)
Problem p04030 (python)

Fixed submission:
import bisect,collections,copy,heapq,itertools,math,numpy,string
from fractions import gcd
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) # tupleも検討する。
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = S()
    L = [i for i in N]
    ans = []

    for i, num in enumerate(L):
        if(num != "B"):
            ans.append(num)
        if(ans != [] and num == "B"):
            ans.pop(-1)

    print("".join(ans))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import bisect,collections,copy,heapq,itertools,math,numpy,string
from fractions import gcd
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) # tupleも検討する。
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = S()
    L = [i for i in N]

    for i, num in enumerate(L):
        if(i != 0 and num == "B"):
            L[i-1] = ""

    L.remove("B")
    print("".join(L))

if __name__ == '__main__':
    main()
Problem p04043 (python)

Fixed submission:
num = list(map(int, input().split()))

ans = sorted(num)
if(ans[0]==5 and ans[1]==5 and ans[2] == 7):
    print("YES")
else:
    print("NO")

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

num = num.sorted
if(num[0]==5 and num[1]==5 and num[2] == 7):
    print("YES")
else:
    print("NO")
Problem p02817 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    StringS,StringT = input().split();

    print(StringT+StringS);

main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def main():
    StringS = input();
    StringT = input();

    print(StringT+StringS);

main()
Problem p02780 (python)

Fixed submission:
from itertools import accumulate
n,k = map(int,input().split())
p = list(map(int,input().split()))

P = []+p
P = list(accumulate(P))

ans = []

if n == 1:
    print((p[0]+1)/2)
elif n == k:
    print((sum(p)+n)/2)
else:    
    for i in range(n-k):
        ans.append(P[i+k]-P[i])
    print((max(ans)+k)/2)

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

P = []+p
P = list(accumulate(P))

ans = []

if n == 1:
    print((p[0]+1)/2)
else:    
    for i in range(n-k):
        ans.append(P[i+k]-P[i])
    print((max(ans)+k)/2)

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

P = []+p
P = list(accumulate(P))

ans = []
for i in range(n-k):
    ans.append(P[i+k]-P[i])

print((max(ans)+k)/2)
Problem p02995 (python)

Fixed submission:
A,B,C,D = map(int,input().split())
import fractions
cnum = B//C - (A-1)//C
dnum = B//D - (A-1)//D
cd = C*D//fractions.gcd(C,D)
cdnum = B//(cd) - (A-1)//(cd)
print((B-A+1)-cnum-dnum+cdnum)

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int,input().split())
import math
cnum = B//C - (A-1)//C
dnum = B//D - (A-1)//D
cd = C*D//math.gcd(C,D)
cdnum = B//(cd) - (A-1)//(cd)
print((B-A+1)-cnum-dnum+cdnum)
Problem p02997 (python)

Fixed submission:
N,K = map(int,input().split())
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
if N == 2:
    if K == 0:
        print(1)
        print('1 2')
    else:
        print(-1)
else:
    uni = combinations_count(N-1,2)
    if uni < K:
        print(-1)
    else:
        ans = []
        for i in range(2,N+1):
            ans.append([1,i])
        kai = uni-K
        for i in range(2,N+1):
            for j in range(2,N+1):
                if kai > 0:
                    if i < j:
                        ans.append([i,j])
                        kai -= 1
                else:
                    break
        print(len(ans))
        for r in ans:
            print(' '.join(map(str,r)))

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
if (N-1)%2 == 0:
    ma = ((N-1)//2)**2
else:
    ma = (N-1)//2*((N-1)//2+1)
#print(ma)
if ma < K:
    print(-1)
else:
    ffadkhah
Problem p03060 (python)

Fixed submission:
a = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split())) 
ans = 0
for i in range(a):
    if v[i] >= c[i]:
        ans += (v[i]-c[i])
print(ans)

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

for i in range(a):
    if v(i) >= c(i):
        ans += (v(i)-c(i))
        
print(ans)
Problem p03071 (python)

Fixed submission:
a,b = map(int,input().split())
if a == b:
    print(a*2)
else:
    c = max(a,b)
    d = c*2-1
    print(d)

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if a == b:
  print(a*2)
else:
  print(max(a,b)*2-1)
Problem p03085 (python)

Fixed submission:
b = input()
if b == 'A':
    b = 'T'
elif b == 'T':
    b = 'A'
elif b == 'G':
    b = 'C'  
else:
    b = 'G'  
 
print(b)

Buggy submission (verdict: Runtime Error):
b = input()
if b == 'A':
  b = 'T'
elif b == 'T':
  b = 'A'
elif b == 'G':
  b = 'C'  
else b == 'C':
  b = 'G'  

print(b)
Problem p03352 (python)

Fixed submission:
n = int(input())
ans = 1
for i in range(1,1001):
    for j in range(2,1001):
        if i**j > n:
            break
        if ans < i**j <= n:
            ans = i**j
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 1
for i in range(1,1001):
    for j in range(2,1001):
        if i**j > n:
            break
        if ans < i**j =< n:
            ans = i**j
print(ans)
Problem p03424 (python)

Fixed submission:
a = input()
b = list(input().split())
if 'Y' in b:
    print('Four')
else:
    print('Three')

Buggy submission (verdict: Runtime Error):
a = input()
b = list(map(int,input().split()))
if 'Y' in b:
    print('Four')
else:
    print('Three')

Buggy submission (verdict: Runtime Error):
a = input()
b = list(map(int,input()split()))
if 'Y' in b:
    print('Four')
else:
    print('Three')
Problem p03777 (python)

Fixed submission:
a,b = input().split()
if (a=='H' and b == 'H')or(a == 'D'and b =='D'):
    print('H')
else:
    print('D')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a=='H' and b == 'H')or(a == 'D'an b =='D'):
    print('H')
else:
    print('D')
Problem p02786 (python)

Fixed submission:
import math
h = int(input())
l = math.floor(math.log(h, 2))
print(2**l * 2 -1)

Buggy submission (verdict: Runtime Error):
import math
h = int(input())
l = math.floor(math.log2(h))
print(2**l * 2 -1)

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

    l = math.floor(math.log2(h))

    print(2**l * 2 -1)
Problem p02789 (python)

Fixed submission:
n, m = map(int, input().split())

print('Yes' if n == m else 'No')

Buggy submission (verdict: Runtime Error):
n, m = map(input().split())

print('Yes' if n == m else 'No')