Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
N,M = map(int,input().split())

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

if N !=0 and N != 1:
    a = combinations_count(N, 2)
else:
    a = 0

if M !=0 and M != 0:
    b = combinations_count(M, 2)
else:
    b = 0

print(a+b)

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

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

if N !=0 and N != 1:
    a = combinations_count(N, 2)
else:
    a = 0

if M !=0 and M != 1:
    b = combinations_count(M, 2)
else:
    b = 0

print(a+b)

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

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

if N !=0 and N != 1:
    a = combinations_count(N, 2)
else:
    a = 0

if M !=0 and M != 0:
    b = combinations_count(M, 2)
else:
    b = 0

print(a+b)

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

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

if N !=0 and N != 1:
    a = combinations_count(N, 2)
else:
    a = 0

if M !=0 and M != 1:
    b = combinations_count(M, 2)
else:
    b = 0

print(a+b)
Buggy python submission (verdict: Runtime Error):
K = int(input())
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(a[K])

Fixed submission:
K = int(input())
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(a[K-1])
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
p = list(map(int,input().split()))

exp = [(1+i)/2 for i in p]

t = []
for i in range(len(p)-k+1):
    t.append(sum(p[i:i+k]))
ind = t.index(max(t))

max_pair = exp[ind:ind+k]

print(sum(max_pair))

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

exp = [(1+i)/2 for i in p]

s = []
sums = 0
for i in exp:
    sums += i
    s.append(sums)

exps = [s[k-1]]
for i in range(k,len(p)):
    exps.append(s[i] - s[i-k])
print(max(exps))

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
p = list(map(int,input().split()))

t = []
for i in range(len(p)-k+1):
    t.append(sum(p[i:i+k]))
ind = t.index(max(t))

max_pair = p[ind:ind+k]
exp = []
for i in max_pair:
    sums=0
    for j in range(1,i+1):
        sums += j/i
    exp.append(sums)
print(sum(exp))

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

exp = [(1+i)/2 for i in p]

s = []
sums = 0
for i in exp:
    sums += i
    s.append(sums)

exps = [s[k-1]]
for i in range(k,len(p)):
    exps.append(s[i] - s[i-k])
print(max(exps))
Buggy python submission (verdict: Runtime Error):
N,K,M=map(int,input().split())
point = list(map(int,input().split()))
full = N*K
tar = M*N
all_p = sum(point)

if full- all_p >full-K:
    print(-1)
else:
    print(full-K-sum(point))

Fixed submission:
C = str(input())
Z='abcdefghijklmnopqrtuvwxyz'
alpha = list(Z)
l_in = [alpha[i+1] for i in range(len(alpha)-1) if C in alpha[i]]
print(l_in[0])
Buggy python submission (verdict: Runtime Error):
A,B = map(int, input().split())
if A+B == 3:
    print(3)
elif A+B == 4:
    print(2)
else:
    print(3)

Fixed submission:
A = int(input())
B = int(input())
if A+B == 3:
    print(3)
elif A+B == 4:
    print(2)
else:
    print(1)

Buggy python submission (verdict: Runtime Error):
A,B = map(int, input().split())
if (A==1) and (B==2):
    print(3)
elif (A==2) and (B==3):
    print(1)
else:
    print(2)

Fixed submission:
A = int(input())
B = int(input())
if A+B == 3:
    print(3)
elif A+B == 4:
    print(2)
else:
    print(1)

Buggy python submission (verdict: Runtime Error):
A,B = map(int, input().split())
if (A==1) and (B==2):
    print(3)
if (A==2) and (B==3):
    print(1)
if (A==3) and (B==1):
    print(2)

Fixed submission:
A = int(input())
B = int(input())
if A+B == 3:
    print(3)
elif A+B == 4:
    print(2)
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())
f = ''
for i in range(N):
    f += S[i]
    f += T[i]
print(f)

Fixed submission:
N = int(input())
S,T=map(str, input().split())
f = ''
for i in range(N):
    f += S[i]
    f += T[i]
print(f)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())
f = ''
for i in range(N):
    f += S[i]
    f += T[i]
print(f)

Fixed submission:
N = int(input())
S,T=map(str, input().split())
f = ''
for i in range(N):
    f += S[i]
    f += T[i]
print(f)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())

f = ''
for i in range(N):
    f += S[i]
    f += T[i]
print(f)

Fixed submission:
N = int(input())
S,T=map(str, input().split())
f = ''
for i in range(N):
    f += S[i]
    f += T[i]
print(f)
Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())
result = list(range(A,B+1)[:K]) + list(range(A,B+1)[-K:])
print(list(set(result)))

Fixed submission:
N = str(input())
print('Yes') if ('a' in N) and ('b' in N) and ('c' in N) else print('No')
Buggy python submission (verdict: Runtime Error):
A,B,C,D=list(map(int,input().split()))
print(min(A,B) + min(C,D))

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
print(min(A,B) + min(C,D))

Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
print(min(A,B) + min(C,D))

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
print(min(A,B) + min(C,D))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())

print('Yes') if A+B >= C else print('No')

Fixed submission:
A,B,C=map(int,input().split())
print('Yes') if A+B >= C else print('No')
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
result = []
for i in range(A,B+1):
    if (str(i)[0] == str(i)[4]) & (str(i)[1] == str(i)[3]):
        result.append(i)
print(len(result))

Fixed submission:
A,B =map(int,input().split())
result = []
for i in range(A,B+1):
    if (str(i)[0] == str(i)[4]) & (str(i)[1] == str(i)[3]):
        result.append(i)
print(len(result))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(input()) for i in range(N)]

Alice = []
Bob = []

for i in range(N):
    if len(A) != 0:
        Alice.append(max(A))
        A.remove(max(A))
    else:
        break
    if len(A) != 0:
        Bob.append(max(A))
        A.remove(max(A))
    else:
        break
print(sum(Alice) - sum(Bob))

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse = True)
Alice = sum(A[::2])
Bob = sum(A[1::2])
print(Alice-Bob)
Buggy python submission (verdict: Runtime Error):
X,A,B = map(int,input().split(' '))
print((X - A) - int((X-A) /100) * B)

Fixed submission:

X = int(input())
A = int(input())
B = int(input())
print((X - A)% B)

Buggy python submission (verdict: Runtime Error):
X,A,B = map(int,input().split(' '))
print(X - (A + B))

Fixed submission:

X = int(input())
A = int(input())
B = int(input())
print((X - A)% B)
Buggy python submission (verdict: Runtime Error):

A = int(input())
B = int(input())
C = int(input())
X = int(input())
memo = np.zeros(3).reshape(1,3)

for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if X == 500*i + 100*j + 50*k :
                result = np.array([i,j,k])
                memo = np.vstack([memo,result])

print(len(memo[1:]))

Fixed submission:
import numpy as np
A = int(input())
B = int(input())
C = int(input())
X = int(input())
memo = np.zeros(3).reshape(1,3)

for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if X == 500*i + 100*j + 50*k :
                result = np.array([i,j,k])
                memo = np.vstack([memo,result])

print(len(memo[1:]))
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())

t=0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z ==s:
                t+=1
print(t)

Fixed submission:
k,s = map(int,input().split())

t=0
for x in range(k+1):
    for y in range(k+1):
        if s-x-y >= 0 and s-x-y <= k: 
            t+=1
print(t)
Buggy python submission (verdict: Time Limit Exceeded):
import queue
import copy
import math
from collections import deque
import bisect

# 2つの入力を空白で分割し、数値化
n, k = map(int, input().split())

# 空白区切りの数値をリスト化
pn = list(map(int, input().split()))

expects = []

max_e = 0
start = -1

for i in range(0, n - k + 1):
    tmp = sum(pn[i:i+k])
    if tmp > max_e:
        start = i
        max_e = tmp

candidate = pn[start:start + k]

for p in candidate:
    e = (((1 + p) * p) // 2) / p
    expects.append(e)

print(sum(expects))

Fixed submission:
import queue
import copy
import math
from collections import deque
import bisect

# 2つの入力を空白で分割し、数値化
n, k = map(int, input().split())

# 空白区切りの数値をリスト化
pn = list(map(int, input().split()))

expects = []
max_e = 0
prev_e = 0

for p, i in zip(pn, range(0, n)):
    e = (((1 + p) * p) // 2) / p
    expects.append(e)
    if i + 1 == k:
        max_e = sum(expects)
        prev_e = max_e
    elif i + 1 > k:
        current_e = prev_e + expects[-1] - expects[i-k]
        max_e = max(max_e, current_e)
        prev_e = current_e
    else:
        continue

print(max_e)

Buggy python submission (verdict: Time Limit Exceeded):
import queue
import copy
import math
from collections import deque
import bisect

# 2つの入力を空白で分割し、数値化
n, k = map(int, input().split())

# 空白区切りの数値をリスト化
pn = list(map(int, input().split()))

expects = []

for p in pn:
    e = (((1 + p) * p) // 2) / p
    expects.append(e)

max_e = 0
for i in range(0, n - k + 1):
    tmp = sum(expects[i:i+k])
    max_e = max(max_e, tmp)

print(max_e)




Fixed submission:
import queue
import copy
import math
from collections import deque
import bisect

# 2つの入力を空白で分割し、数値化
n, k = map(int, input().split())

# 空白区切りの数値をリスト化
pn = list(map(int, input().split()))

expects = []
max_e = 0
prev_e = 0

for p, i in zip(pn, range(0, n)):
    e = (((1 + p) * p) // 2) / p
    expects.append(e)
    if i + 1 == k:
        max_e = sum(expects)
        prev_e = max_e
    elif i + 1 > k:
        current_e = prev_e + expects[-1] - expects[i-k]
        max_e = max(max_e, current_e)
        prev_e = current_e
    else:
        continue

print(max_e)
Buggy python submission (verdict: Time Limit Exceeded):
import queue
import copy
import math
from collections import deque

# そのまま入力文字列の入力
n = int(input())

# 空白区切りの数値をリスト化
pn = list(map(int, input().split()))

ans = 0
for i in range(0, n):
    if i == 0:
        ans += 1
        continue

    all_small = True

    for j in range(i, -1, -1):
        if pn[i] <= pn[j]:
            continue
        else:
            all_small = False
            break

    if all_small:
        ans += 1


print(ans)

Fixed submission:
import queue
import copy
import math
from collections import deque

# そのまま入力文字列の入力
n = int(input())

# 空白区切りの数値をリスト化
pn = list(map(int, input().split()))

ans = 0
current_min = n + 1

for i in range(0, n):
    if i == 0:
        current_min = pn[i]
        ans += 1
        continue

    if pn[i] < current_min:
        ans += 1
        current_min = pn[i]
        continue

print(ans)
Buggy python submission (verdict: Runtime Error):
# そのまま入力文字列の入力
n = int(input())

# 空白区切りの数値をリスト化
an = list(map(int, input().split()))

ans = 0


def search_and_break(blocks, target):
    global  ans
    position = 0
    if len(blocks) == 0:
        return ans

    for i in range(0, len(blocks)):
        if blocks[i] == target:
            return search_and_break(blocks[(position+1):], target + 1)
        else:
            ans += 1
            position += 1

    return -1


print(search_and_break(an, 1))

Fixed submission:
# そのまま入力文字列の入力
n = int(input())

# 空白区切りの数値をリスト化
an = list(map(int, input().split()))

ans = 0

target = 1
has_ans = False
for i in range(0, n):
    if an[i] == target:
        has_ans = True
        target += 1
    else:
        ans += 1

print(ans if has_ans else "-1")
Buggy python submission (verdict: Runtime Error):
N = int(input())

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

sum_of_an = sum(An)

if sum_of_an % 2 == 0:
    half_of_an = sum_of_an / 2
    sum_left_len = 0
    for l in An:
        sum_left_len += l
        if sum_left_len == half_of_an:
            print(0)
            exit(0)
        elif sum_left_len > half_of_an:
            break
min_yen = None
left_len = 0
for (i, l) in zip(range(0, N), An):
    if i == N:
        break

    left_len += l
    if min_yen is None:
        min_yen = abs(sum_of_an - left_len)
    else:
        min_yen = min(min_yen, abs(sum_of_an, left_len))

print(min_yen)

Fixed submission:
N = int(input())

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

sum_of_an = sum(An)

if sum_of_an % 2 == 0:
    half_of_an = sum_of_an / 2
    sum_left_len = 0
    for l in An:
        sum_left_len += l
        if sum_left_len == half_of_an:
            print(0)
            exit(0)
        elif sum_left_len > half_of_an:
            break
min_yen = None
left_len = 0
for (i, l) in zip(range(0, N), An):
    if i == N - 1:
        break

    left_len += l
    if min_yen is None:
        min_yen = abs(sum_of_an - left_len * 2)
    else:
        min_yen = min(min_yen, abs(sum_of_an - left_len * 2))

print(min_yen)

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

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

sum_of_an = sum(An)

if sum_of_an % 2 == 0:
    half_of_an = sum_of_an / 2
    sum_left_len = 0
    for l in An:
        sum_left_len += l
        if sum_left_len == half_of_an:
            print(0)
            exit(0)
        elif sum_left_len > half_of_an:
            break
min_yen = None
left_len = 0
for (i, l) in zip(range(0, N - 1), An):
    left_len += l
    if min_yen is None:
        min_yen = abs(sum_of_an - left_len)
    else:
        min_yen = min(min_yen, abs(sum_of_an, left_len))

print(min_yen)

Fixed submission:
N = int(input())

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

sum_of_an = sum(An)

if sum_of_an % 2 == 0:
    half_of_an = sum_of_an / 2
    sum_left_len = 0
    for l in An:
        sum_left_len += l
        if sum_left_len == half_of_an:
            print(0)
            exit(0)
        elif sum_left_len > half_of_an:
            break
min_yen = None
left_len = 0
for (i, l) in zip(range(0, N), An):
    if i == N - 1:
        break

    left_len += l
    if min_yen is None:
        min_yen = abs(sum_of_an - left_len * 2)
    else:
        min_yen = min(min_yen, abs(sum_of_an - left_len * 2))

print(min_yen)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n=int(input())
s=input()

async=0
for i in range(1,n):
    a=set(s[:i])
    b=set(s[i:])
    c=a&b
    if len(c)>ans:
        ans=len(c)

print(ans)


Fixed submission:
# -*- coding: utf-8 -*-

n=int(input())
s=input()

ans=0
for i in range(1,n):
    a=set(s[:i])
    b=set(s[i:])
    c=a&b
    if len(c)>ans:
        ans=len(c)

print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math

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

d=math.gcd(a,b)

if c%d==0:
    print('YES')
else:
    print('NO')


Fixed submission:
# -*- coding: utf-8 -*-

import fractions

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

d=fractions.gcd(a,b)

if c%d==0:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math

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

d=math.gcd(a,b)

if c%d==0:
    print("YES")
else:
    print("NO")


Fixed submission:
# -*- coding: utf-8 -*-

import fractions

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

d=fractions.gcd(a,b)

if c%d==0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
a,b=[int(i) for i in input().split()]
print(min([2*a-1,a+b,2*b-1])

Fixed submission:
a,b=[int(i) for i in input().split()]
print(max([2*a-1,a+b,2*b-1]))

Buggy python submission (verdict: Runtime Error):
a,b=[int(i) for i in input().split()]

print(min[2*a-1,a+b,2*b-1])

Fixed submission:
a,b=[int(i) for i in input().split()]
print(max([2*a-1,a+b,2*b-1]))
Buggy python submission (verdict: Time Limit Exceeded):
import sys

N, M = map(int, sys.stdin.readline().split())
H = list(map(int, sys.stdin.readline().split()))
A = []
B = []
for i in range(M):
    temp_A, temp_B = map(int, sys.stdin.readline().split())
    A.append(temp_A)
    B.append(temp_B)

list2 = [[0 for i in range(N)] for j in range(N)]
for i in range(M):
    list2[A[i]-1][B[i]-1] = 1
    list2[B[i]-1][A[i]-1] = 1

count = N
for i in range(N):
    for j in range(N):
        if list2[i][j] == 1 and H[i] <= H[j]:
            count = count - 1
            break
print(count)



Fixed submission:
import sys

N, M = map(int, sys.stdin.readline().split())
H = list(map(int, sys.stdin.readline().split()))
A = []
B = []
for i in range(M):
    temp_A, temp_B = map(int, sys.stdin.readline().split())
    A.append(temp_A)
    B.append(temp_B)

dame = []
for i in range(M):
    if H[B[i]-1] > H[A[i]-1]:
        dame.append(A[i])
    if H[A[i]-1] > H[B[i]-1]:
        dame.append(B[i])
    if H[A[i]-1] == H[B[i]-1]:
        dame.append(A[i])
        dame.append(B[i])
print(N - len(set(dame)))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from math import factorial


def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod



mod = 10**9 + 7
x, y = map(int, sys.stdin.readline().split())

if (x + y)%3 != 0:
    print(0)
    sys.exit()
if y < x/2 and y > 2*x:
    print(0)
    sys.exit()

count = 0
while(True):
    if y == 1/2*x:
        break
    else:
        x -= 1
        y -= 2
        count += 1
sum = count + y

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, sum + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

if count < y:
    a = cmb(sum,count,mod)
else:
    a = cmb(sum, y, mod)

print(a)


Fixed submission:
import sys
from math import factorial


def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9 + 7
x, y = map(int, sys.stdin.readline().split())

if (x + y)%3 != 0:
    print(0)
    sys.exit()
if y < x/2 and y > 2*x:
    print(0)
    sys.exit()

count1 = int((y-2*x)/(-3))
count2 = int((x-2*y)/(-3))

sum = count1 + count2

N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, sum + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

a = cmb(sum,count1,mod)

print(a)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
from math import factorial


def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod



mod = 10**9 + 7
x, y = map(int, sys.stdin.readline().split())

if (x + y)%3 != 0:
    print(0)
    sys.exit()
if y < x/2 and y > 2*x:
    print(0)
    sys.exit()

count = 0
while(True):
    if y == 1/2*x:
        break
    else:
        x -= 1
        y -= 2
        count += 1
count2 = y
sum = count + count2

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, sum + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

a = cmb(sum,count,mod)

print(a)


Fixed submission:
import sys
from math import factorial


def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9 + 7
x, y = map(int, sys.stdin.readline().split())

if (x + y)%3 != 0:
    print(0)
    sys.exit()
if y < x/2 and y > 2*x:
    print(0)
    sys.exit()

count1 = int((y-2*x)/(-3))
count2 = int((x-2*y)/(-3))

sum = count1 + count2

N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, sum + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

a = cmb(sum,count1,mod)

print(a)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

N, M = map(int, sys.stdin.readline().split())

L = []
R = []

for i in range(M):
    temp_l, temp_r = map(int, sys.stdin.readline().split())
    L.append(temp_l)
    R.append(temp_r)

master_list = list(range(1, N+1))
master_set = set(master_list)

ans = master_set
for i in range(M):
    current_set = set(list(range(L[i], R[i]+1)))
    ans = ans & current_set

print(len(ans))

Fixed submission:
import sys

N, M = map(int, sys.stdin.readline().split())

L = []
R = []

for i in range(M):
    temp_l, temp_r = map(int, sys.stdin.readline().split())
    L.append(temp_l)
    R.append(temp_r)

temp = min(R) - max(L) + 1

if temp > 0:
    print(temp)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
temp = input()
temp_spl = temp.split()
N = int(temp_spl[0])
Q = int(temp_spl[1])

temp = input()
s = temp
golem_place = list(range(N))

# 呪文の数だけループする
for i in range(Q):
    temp = input()
    temp_spl = temp.split()
    t = temp_spl[0]
    d = temp_spl[1]
    if d == "L":
        adder = -1
    else:
        adder = 1
    # golemの移動
    for j in range(N):
        if golem_place[j] != 99999999:
            if s[golem_place[j]] == t:
                golem_place[j] = golem_place[j] + adder

    # ゴーレムを排除
    for j in range(N):
        if golem_place[j] < 0 or golem_place[j] >= N:
            golem_place[j] = 99999999
    #print(golem_place)

alive_count = 0
for i in range(N):
    if golem_place[i] < 99999999:
        alive_count = alive_count + 1
print(alive_count)

Fixed submission:
temp = input()
temp_spl = temp.split()
a = int(temp_spl[0])
b = int(temp_spl[1])
c = int(temp_spl[2])

if a == b and b == c and b >=1 and b <= 100:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
temp = input()
temp_spl = temp.split()
a = int(temp_spl[0])
b = int(temp_spl[1])
c = int(temp_spl[2])

if a == b and b == c and b >=1 and b <= 100:
    print("Yes")
else:
    pritn("No")

Fixed submission:
temp = input()
temp_spl = temp.split()
a = int(temp_spl[0])
b = int(temp_spl[1])
c = int(temp_spl[2])

if a == b and b == c and b >=1 and b <= 100:
    print("Yes")
else:
    print("No")