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

Fixed submission:
N = int(input())

# 約数
# O(N**0.5)
def yakusu(N):
    ret = [[], []]
    for i in range(1, int(N ** 0.5)+1):
        if N % i == 0:
            ret[0].append(i)
            if i ** 2 != N:
                ret[1].append(N//i)
    return ret[0] + ret[1][::-1]

ans = 0
for a in yakusu(N):
    if a == 1: continue
    
    if N % a == 0:
        b = N
        while b % a == 0:
            b //= a
        if (b-1) % a == 0:
            ans += 1
print(ans + len(yakusu(N-1)) - 1)

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

N, M = map(int, input().split())
ABC = np.zeros((N, 3))
for i in range(N):
    ABC[i][0], ABC[i][1], ABC[i][2] = map(int, input().split())
DEF = np.zeros((M, 3))
for i in range(M):
    DEF[i][0], DEF[i][1], DEF[i][2] = map(int, input().split())

# 座標圧縮
x_co = {-10**9-1, 10**9+1}
y_co = {-10**9-1, 10**9+1}
for i in range(N):
    x_co.add(ABC[i][0])
    x_co.add(ABC[i][1])
    y_co.add(ABC[i][2])
for i in range(M):
    x_co.add(DEF[i][0])
    y_co.add(DEF[i][1])
    y_co.add(DEF[i][2])

x_co = np.array(sorted(list(x_co)))
y_co = np.array(sorted(list(y_co)))
xL = len(x_co) - 1
yL = len(y_co) - 1
x_co_d = {x_co[i]: i for i in range(xL+1)}
y_co_d = {y_co[i]: i for i in range(yL+1)}

# 柵の存在
s_ex_tate = np.zeros((yL+1, xL))
s_ex_yoko = np.zeros((xL+1, yL))
for i in range(N):
    a = x_co_d[ABC[i][0]]
    b = x_co_d[ABC[i][1]]
    c = y_co_d[ABC[i][2]]
    s_ex_tate[c][a:b] = 1
for i in range(M):
    d = x_co_d[DEF[i][0]]
    e = y_co_d[DEF[i][1]]
    f = y_co_d[DEF[i][2]]
    s_ex_yoko[d][e:f] = 1

# 初期位置
for i in range(xL):
    if x_co[i+1] > 0:
        xf = [i]
        break
    if x_co[i+1] == 0:
        xf = [i, i+1]
        break
for i in range(yL):
    if y_co[i+1] > 0:
        yf = [i]
        break
    if y_co[i+1] == 0:
        yf = [i, i+1]
        break

def sq(x, y):
    return int((x_co[x+1]-x_co[x]) * (y_co[y+1]-y_co[y]))

# 探索
Q = []
# houmon = [[False] * yL for _ in range(xL)]
houmon = np.zeros((xL, yL))
ans = 0
is_inf = False
for x in xf:
    for y in yf:
        houmon[x][y] = 1
        Q.append((x, y))

while Q:
    x, y = Q.pop()
    if x in [0, xL-1] or y in [0, yL-1]:
        is_inf = True
        break
    ans += sq(x, y)
    if (not houmon[x-1][y]) and (not s_ex_yoko[x][y]):
        houmon[x-1][y] = True
        Q.append((x-1, y))
    if (not houmon[x][y-1]) and (not s_ex_tate[y][x]):
        houmon[x][y-1] = True
        Q.append((x, y-1))
    if (not houmon[x+1][y]) and (not s_ex_yoko[x+1][y]):
        houmon[x+1][y] = True
        Q.append((x+1, y))
    if (not houmon[x][y+1]) and (not s_ex_tate[y+1][x]):
        houmon[x][y+1] = True
        Q.append((x, y+1))
    
if is_inf:
    print('INF')
else:
    print(ans)
Problem p02744 (python)

Fixed submission:
# ret = []
N = int(input())
newL = [[0]]
# ret.append(L.copy())

for _ in range(N - 1):
    L = newL.copy()
    newL = []
    for s in L:
        for i in range(max(s) + 2):
            newL.append(s.copy() + [i])
#     ret.append(newL.copy())
    
di = {i: chr(ord('a') + i) for i in range(10)}
print('\n'.join([''.join(list(map(lambda x: di[x], newL[i]))) for i in range(len(newL))]))

Buggy submission (verdict: Runtime Error):
# ret = []
N = int(input())
L = [[0]]
# ret.append(L.copy())

for _ in range(N - 1):
    newL = []
    for s in L:
        for i in range(max(s) + 2):
            newL.append(s.copy() + [i])
#     ret.append(newL.copy())
    L = newL.copy()
    
di = {i: chr(ord('a') + i) for i in range(10)}
print('\n'.join([''.join(list(map(lambda x: di[x], newL[i]))) for i in range(len(newL))]))

Buggy submission (verdict: Runtime Error):
# ret = []
N = int(input())
L = [[0]]
ret.append(L.copy())

for _ in range(N - 1):
    newL = []
    for s in L:
        for i in range(max(s) + 2):
            newL.append(s.copy() + [i])
#     ret.append(newL.copy())
    L = newL.copy()
    

print('\n'.join([''.join(list(map(lambda x: di[x], newL[i]))) for i in range(len(newL))]))
Problem p02621 (python)

Fixed submission:


a=int(input())

print(a+a**2+a**3)

Buggy submission (verdict: Runtime Error):


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

print(a+a**2+a**3)
Problem p02630 (python)

Fixed submission:

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = []
C = []
for i in range(Q):
    b, c = list(map(int, input().split()))
    B.append(b)
    C.append(c)

max_num = max(max(A), max(B), max(C))

NUM = [0] * (max_num + 1)

num_list = []

for a in A:
    NUM[a] += 1

total = sum(A)

for i in range(Q):

    total += (C[i] - B[i]) * NUM[B[i]]
    NUM[B[i]], NUM[C[i]] = 0, NUM[B[i]] + NUM[C[i]]

    print(total)

Buggy submission (verdict: Runtime Error):
def getCalc(NUM):
    sum = 0
    for i in range(len(NUM)):
        sum += i*NUM[i]


N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = []
C = []
for i in range(Q):
    b, c = list(map(int, input().split()))
    B.append(b)
    C.append(c)

max_num = max(max(A), max(B), max(C))

NUM = [0]*max_num + 1

for i in range(NUM):
    NUM[i] = A.count(i)

for i in range(Q):
    NUM[B[i]], NUM[C[i]] = 0, NUM[B[i]] + NUM[C[i]]

    print(getCalc(NUM))

Buggy submission (verdict: Runtime Error):
def getCalc(AAA, BBB):
    sum = 0
    for i in range(len(AAA)):
        sum += AAA[i] * BBB[i]
    return sum


N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = []
C = []
for i in range(Q):
    b, c = list(map(int, input().split()))
    B.append(b)
    C.append(c)

AAA = []
BBB = []

for i in range(10 ** 5 + 1):
    count = A.count(i)
    if (count > 0):
        AAA.append(i)
        BBB.append(count)

for i in range(Q):
    if (B[i] in AAA):
        index = AAA.index(B[i])

        if(C[i] in AAA):
            Cindex = AAA.index(C[i])
            AAA[index] = C[i]
            BBB[index] += BBB[Cindex]
            AAA.pop(Cindex)
            BBB.pop(Cindex)
        else:
            AAA[index] = C[i]

        total = getCalc(AAA, BBB)

    print(total)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = []
C = []
for i in range(Q):
    b, c = list(map(int, input().split()))
    B.append(b)
    C.append(c)

total = sum(A)

for i in range(Q):
    count = A.count(B[i])

    d = C[i] - B[i]
    total += count * B
    print(total)

    A = [C[i] if x == B[i] else x for x in A]
Problem p02687 (python)

Fixed submission:
S = input()


if (S == "ABC"):
    print("ARC")
if (S == "ARC"):
    print("ABC")

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


if (S = "ABC"):
    print("ARC")
if (S = "ARC"):
    print("ABC")
Problem p02985 (python)

Fixed submission:
n, m = [int(i) for i in input().split()]
# n, m = 100000, 100000

G = [[] for i in range(n + 1)]
C = [m for i in range(n + 1)]
for i in range(n - 1):
    x, y = [int(i) for i in input().split()]
    # x, y = i + 1, i + 2
    G[x].append(y)
    G[y].append(x)

ans = 1
def dfs(s):
    global ans, C, G
    stack = [s]
    while len(stack):
        u = stack[len(stack) - 1]
        stack.pop()
        ans *= C[u]
        ans %= 1000000007
        # print(u, C[u], ans)
        tot = 1
        if u != 1:
            tot += 1
        for v in G[u]:
            C[v] -= tot
            G[v].remove(u)
            stack.append(v)
            tot += 1

dfs(1)
print(ans)

Buggy submission (verdict: Runtime Error):
n, m = [int(i) for i in input().split()]
G = [[] for i in range(n + 1)]
C = [m for i in range(n + 1)]
for i in range(n - 1):
    x, y = [int(i) for i in input().split()]
    G[x].append(y)
    G[y].append(x)

ans = 1
def dfs(u):
    global ans, C, G
    ans *= C[u]
    ans %= 1000000007
    # print(u, C[u], ans)
    tot = 1
    if u != 1:
        tot += 1
    for v in G[u]:
        C[v] -= tot
        G[v].remove(u)
        dfs(v)
        tot += 1
dfs(1)
print(ans)
Problem p02687 (python)

Fixed submission:
s=input()
print('ARC') if s=='ABC' else print('ABC')

Buggy submission (verdict: Runtime Error):
s=string(input())
print('ARC') if s=='ABC' else print('ABC')
Problem p02602 (python)

Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
i = 0
for x in input().split():
    A = int(x)
    l.append(A)
    if i >= K:
        if l.pop(0) < A:
            print("Yes")
        else:
            print("No")
    i = i + 1
Problem p02702 (python)

Fixed submission:
s = input()
n = len(s)
ans = 0
now = 0
mp = [0 for i in range(2019)]
mp[0] += 1
tmp = [0 for i in range(2019)]

id = [0 for i in range(2019)]
for i in range(2019):
    id[i] = i * 10 % 2019

for c in s:
    now *= 10;
    now += ord(c) - ord("0")
    now %= 2019

    ans += mp[now]
    mp[now] += 1
    for i in range(2019):
        tmp[id[i]] = mp[i]
    for i in range(2019):
        mp[i] = tmp[i]

print(ans)

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

@njit
def solve(s):
    n = len(s)
    ans = 0
    now = 0
    mp = np.zeros(2019, np.int)
    mp[0] += 1
    tmp = np.zeros(2019, np.int)

    id = np.zeros(2019, np.int)
    for i in range(2019):
        id[i] = i * 10 % 2019

    for c in s:
        now *= 10;
        now += ord(c) - ord("0")
        now %= 2019

        ans += mp[now]
        mp[now] += 1
        for i in range(2019):
            tmp[id[i]] = mp[i]
        for i in range(2019):
            mp[i] = tmp[i]

    print(ans)

s = input()
solve(s)

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

s = input()
n = len(s)
ans = 0
now = 0
mp = np.zeros(2019, np.int)
mp[0] += 1
tmp = np.zeros(2019, np.int)

id = np.zeros(2019, np.int)
for i in range(2019):
    id[i] = i * 10 % 2019

for c in s:
    now *= 10;
    now += ord(c) - ord("0")
    now %= 2019

    ans += mp[now]
    mp[now] += 1
    for i in range(2019):
        tmp[id[i]] = mp[i]
    for i in range(2019):
        mp[i] = tmp[i]

print(ans)
Problem p03192 (python)

Fixed submission:
s = input()

cnt=0
for c in s:
    if c =="2":
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
else:
    for i in range(2,int(p**(1/n))+1):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
else:
    for i in range(int(p**(1/n))+2,1,-1):
        if p%i**n==0:
            res=i
            break
print(res)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
else:
    for i in range(2,int(p**(1/n))+1):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
if n==1:
    print(p)
    exit
if n==2:
    import math
    sqrt=math.sqrt(p)
    if sqrt==int(sqrt):
        print(int(sqrt))
 
else :print(1)

Buggy submission (verdict: Runtime Error):
import sys
def soin(n):
    I=n
    s=0
    R=int(I)
    L=[]
    while s==0:
        for i in range(2,R+1):
            if I%i==0:
                I=I/i
                if I==1:
                    s=1
                L.append(i)
                break
    if len(L)==1:
        print(R)
    else:
        print(L)

n,p= map(int,input().split())
if n==1:
    print(p)
    sys.exit()
l=soin(p)
if len(l)<n:
    print(1)
    sys.exit()
print(l.min())
Problem p03194 (python)

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
if 2 >= int(p**(1/n))+2):
    print(1)
else: print(0)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
else:
    for i in range(2,int(p**(1/n))+2):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
elif n==2:
    for i in range(int(pow(p,1/2)),int(pow(p,1/2))+2):
        if x>p:
            break
        if p%x==0:
            res=i
else:
    for i in range(2,int(pow(p,1/n))+2):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Buggy submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
elif n==2:
    for i in range(int(pow(p,1/2)),int(pow(p,1/2))+2):
else:
    for i in range(2,int(pow(p,1/n))+2):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Buggy submission (verdict: Runtime Error):
import sys
def soin(n):
    I=n
    s=0
    R=int(I)
    L=[]
    while s==0:
        for i in range(2,R+1):
            if I%i==0:
                I=I/i
                if I==1:
                    s=1
                L.append(i)
                break
    if len(L)==1:
        print(R)
    else:
        print(L)

n,p= map(int,input().split())
if n==1:
    print(p)
    sys.exit()
l=soin(p)
if len(l)<n:
    print(1)
    sys.exit()
print(min(l))
Problem p03260 (python)

Fixed submission:
a,b=map(int,input().split());print('No'if a*b%2==0else'Yes')

Buggy submission (verdict: Runtime Error):
a,b=int(input())
res='Yes'
if a*b ==0: res='No'
if a*b >3: res='No'
print(res)
Problem p03262 (python)

Fixed submission:
n,x=map(int,input().split())
pos=list(map(int,input().split()))
pos2=[abs(p-x) for p in pos]
def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)
 
        return divisor_list

if n==1: ans=pos2[0]
else:
    minpos= min(pos2)
    divs=make_divisor_list(minpos)[::-1]
    if divs[0]==1:ans=1
    else:
        for j in divs:
            if all(x%j==0 for x in pos2):
                ans=j
                break
print(ans)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
pos=list(map(int,input().split()))
pos2=[abs(p-x) for p in pos]
def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)
 
        return divisor_list

if n==1: ans=pos2[0]
else:
    minpos= min(pos2)
    divs=make_divisor_list(minpos)[::-1]
    if divs[0]==1:ans=1
    else:
        for j in divs:
        if all(x%j==0 for x in pos2):
            ans=j
            break
print(ans)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
pos=list(map(int,input().split()))
pos2=[abs(p-x) for p in pos]
def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)
 
        return divisor_list

if n==1: ans=pos2[0]
else:
    minpos= min(pos2)
    divs=make_divisor_list(minpos)[::-1]
    if divs[0]==1:ans=1
        else:
            for j in divs:
            if all(x%j==0 for x in pos2):
                ans=j
                break
print(ans)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
pos=list(map(int,input().split()))
pos2=[abs(p-x) for p in pos]
def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)
 
        return divisor_list
 
minpos= min(pos2)
divs=make_divisor_list(minpos)[::-1]
if divs[0]==1:ans==1
else:
  for j in divs:
    if all(x%j==0 for x in pos2):
        ans=j
        break
print(ans)
Problem p03294 (python)

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

cnt=0
f=0
for i in l:
    f += i-1
print(f)

Buggy submission (verdict: Runtime Error):
import math

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

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

llcm=1
for i in range(n):
    llcm= lcm(llcm,l[i])

Buggy submission (verdict: Runtime Error):
import math

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

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

llcm=1
for i in range(n):
    llcm= lcm(llcm,l[i])

mmax=llcm
fmmax=0
for m in range(mmax):
    fm=0
    for i in l:
        fm += m%i
    if fm > fmmax:
        fmmax=fm
print(fmmax)

Buggy submission (verdict: Runtime Error):
import math

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


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

llcm=1
for i in range(n):
    llcm= lcm(llcm,l[i])

mmax=llcm
fmmax=0
    
for m in range(mmax):
    fm=0
    for i in l:
        fm += m%i
    if fm > fmmax:
        fmmax=fm
print(fmmax)
Problem p03308 (python)

Fixed submission:
n=int(input())
 
a = list(map(int, input().split()))
amin= min(a)
amax= max(a)
 
res= amax-amin
print(res)

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

a = [map(int, input().split())]

amin= min(a)
amax= max(a)

res= amax-amin
print(res)
Problem p03309 (python)

Fixed submission:
import statistics as stc

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

#a[i]-(b+1) = a[i]-i-b
a_ = [a[i]-(i+1) for i in range(len(a))]

b=stc.median(a_)

def sad(a,b):
    b=int(b)
    score=0
    for i in range(len(a)):
        score+= abs(a[i]-b)
    return score

res = sad(a_,b)
print(res)

Buggy submission (verdict: Runtime Error):
import statistics as stc

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

#a[i]-(b+1) = a[i]-i-b
a_ = [a[i]-(i+1) for i in range(len(a))]

b=stc.median(a)

def sad(a,b):
    score=0
    for i in range(1,len(a)+1):
        #score+= abs(a[i]-(b+i))
        score+= abs(a_[i]-b)

res = sad(a,b)
print(res)
Problem p03353 (python)

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

M=len(s)
sss=set()
for i in range(M):
    for j in range(i+1,i+k+1):
        tmp = s[i:j]
        sss.add(tmp)
l = list(sss)
l.sort()
print(l[k-1])

Buggy submission (verdict: Runtime Error):
s = input()
k = int(input())
def ss(s,k):
    M=len(s)
    sss=set()
    for i in range(M):
        for j in range(i+1,M+1):
            tmp = s[i:j]
            sss.update(tmp)
    l = list(sss)
    l.sort()
    #print(l)
    ret = l[k-1]
    return(ret)
 
res=ss(s,k)
print(res)

Buggy submission (verdict: Runtime Error):
s = input()
k=int(input())
def ss(s,k):
    M=len(s)
    l=[]
    for i in range(M):
        for j in range(i+1,M+1):
            tmp = s[i:j]
            l.append(tmp)
    l.sort()
    #print(l)
    ret = l[k-1]
    return(ret)

print(ss(s,k))
Problem p03385 (python)

Fixed submission:
print(["Yes","No"][len(set(input()))<3])

Buggy submission (verdict: Runtime Error):
print(["Yes","No"][len(set(input())<3)])

Buggy submission (verdict: Runtime Error):
print(["Yes","No"][len(set(input())<3])

Buggy submission (verdict: Runtime Error):
["Yes","No"][len(set(input())<3]
Problem p03400 (python)

Fixed submission:
n=int(input())
d,x=map(int,input().split())
cnt=x
for i in range(n):
  a = int(input())
  day=1
  while day <= d:
    cnt+=1
    day+=a
    
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
d,x=map(int,input().split())
cnt=x
for i in range(n):
  a = input()
  if a < d:
    cnt+=1
print(cnt)
Problem p03473 (python)

Fixed submission:
print(48-int(input()))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split());s=input();print(['No','Yes'][s[a]=='-'and s.count('-')>0])
Problem p03485 (python)

Fixed submission:
import math;a,b=map(int,input().split());print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
s=sorted;print(['No','Yes'][s(input())<s(input())[::-1]])

Buggy submission (verdict: Runtime Error):
s=sorted;print(['No','Yes'][s(input())<s(input(),reverse=1)])
Problem p03486 (python)

Fixed submission:
print('Yes'if sorted(input())<sorted(input(),reverse=1)else'No')

Buggy submission (verdict: Runtime Error):
s=sorted;print(['No','Yes'][s(input())<s(input())[-1]])

Buggy submission (verdict: Runtime Error):
s=sorted;print(['No','Yes'][s(input())<s(input())[-1]])

Buggy submission (verdict: Runtime Error):
print('Yes') if input().sorted()<input().sorted(reversed=True) else:print('No')
Problem p03547 (python)

Fixed submission:
x,y=input().split()
print('<'if x<y else'>'if x>y else'=')

Buggy submission (verdict: Runtime Error):
x,y=input.split()
res='='
if x<y:res='<'
if x>y:res='>'
print(res)

Buggy submission (verdict: Runtime Error):
x,y=input.split();print('<'if x<y else '>'if x>y else'=')
Problem p03635 (python)

Fixed submission:
a,b=map(int,input().split());print(a*b-a-b+1)

Buggy submission (verdict: Runtime Error):
a,b=map(int.input().split())
print(a-1*b-1)
Problem p03672 (python)

Fixed submission:
s=input()
while 1:
  s=s[:-2]
  l=len(s)
  if s[:l//2]==s[l//2:]:
    print(l)
    break

Buggy submission (verdict: Runtime Error):
s=input()
while(1):
  s=s[:-2]
  l=len(s)
  if s[:l/2]==s[l/2:]:
    print(l)
    break

Buggy submission (verdict: Runtime Error):
s=input()
while(1):
  s=s[:-2]
  l=len(s)
  if s[:l/2]==s[l/2:]:
  	print(l)
    break
Problem p02657 (python)

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

ans=A*B

print(ans)

Buggy submission (verdict: Runtime Error):
import math

def using_sqrt(limit,elm):
    n = 0
    if limit < 2:
        return 0

    elm.append(2)

    for k in range(3, limit+1,2):
        factor = 0

        # 2以外の偶数は素数ではないので無視する
        if k % 2 == 0 and k != 2:
            continue

        # 繰り返しの上限を対象の平方根にする
        for divisor in range(2, math.floor(math.sqrt(k))+1):
            if k % divisor == 0:
                factor += 1

        if factor == 0:
            elm.append(k)
            n += 1

    return n


N = int(input())
A = []

using_sqrt(N,A)

A_len=len(A)

for i in range(A_len):
    chk = A[i]
    while True:
        chk *= A[i]
        if chk <= N:
            A.append(chk)
        else:
            break

A.sort()

A_len=len(A)
cnt = 0
chk_N = N
for i in range(A_len):
    if chk_N % A[i] == 0:
        chk_N = int(chk_N / A[i])
        cnt += 1
        
    if chk_N == 1:
        break

print(cnt)
Problem p02681 (python)

Fixed submission:
s=input()
t=input()
if len(s)+1 == len(t) and t.startswith(s):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A=list(map(int,input().split()))
ans = 0
if A[0] >= A[3]:
    ans = A[3]
else:
    A[3] = A[3]-A[0]
    ans = A[0]
    A[3] = A[3] -A[1]
    if A[3] > 0:
        ans = ans - A[3]
print(ans)
Problem p02714 (python)

Fixed submission:
import itertools
from collections import Counter

N = int(input())
S = input()

C=Counter(S)
r = C['R']
g = C['G']
b = C['B']


cnt = r * g * b

for i in range(0,N-2):
    for j in range(i,N-1):
        k = j + j - i
        if k < N:
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                cnt -= 1

print(cnt)

Buggy submission (verdict: Runtime Error):
import itertools
from collections import Counter

N = int(input())
S = input()

C=Counter(S)
r = C['R']
g = C['G']
b = C['B']


cnt = r * g * b

for i in range(0,N-2):
    for j in range(i,N-1):
        k = j + j - i
        if k < N:
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]):
                cnt -= 1

print(cnt)

Buggy submission (verdict: Runtime Error):
import itertools
from collections import Counter

N = int(input())
S = input()

C=Counter(S)
r = C['R']
g = C['G']
b = C['B']


cnt = r * g * b

sum = 0
for i in range(0,N-2):
    for j in range(i,N-1):
        k = j + j - i
        if k < N
            if (S[i] != S[j]) and (S[i] != S[k] and S[j] != S[k]):
                cnt -= 1

print(cnt)