Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

pT, pX, pY = 0, 0, 0

for i in range(N):
    cT, cX, cY = l[i]
    mvT, mvX, mvY = abs(cT-pT), abs(cX-pX), abs(cY-pY)
    
    dam = mvT - (mvX+mvY)

    if dam %2 == 1 or dam < 0:
        print('No')
        exit()

    pT, pX, pY = l[i]

print('Yes')



Fixed submission:
N = int(input())
l = [list(map(int, input().split())) for _ in range(N)]

pT, pX, pY = 0, 0, 0

for i in range(N):
    cT, cX, cY = l[i]
    mvT, mvX, mvY = abs(cT-pT), abs(cX-pX), abs(cY-pY)
    
    dam = mvT - (mvX+mvY)

    if dam %2 == 1 or dam < 0:
        print('No')
        exit()

    pT, pX, pY = l[i]

print('Yes')

Buggy python submission (verdict: Runtime Error):
 N = int(input())
l = [list(map(int,input().split())) for _ in range(N)]

ans = 'Yes'

for i in range(N-1):
    dt = l[i+1][0]-l[i][0]
    dx = l[i+1][1]-l[i][1]
    dy = l[i+1][2]-l[i][2]
    
    if dt < dx+dy:
        ans = 'No'
    else:
        if dt%2==0:
            if (dx+dy)%2!=0:
                ans = 'No'
        else:
            if (dx+dy)%2==0:
                ans = 'No'
                
print(ans)

Fixed submission:
N = int(input())
l = [list(map(int, input().split())) for _ in range(N)]

pT, pX, pY = 0, 0, 0

for i in range(N):
    cT, cX, cY = l[i]
    mvT, mvX, mvY = abs(cT-pT), abs(cX-pX), abs(cY-pY)
    
    dam = mvT - (mvX+mvY)

    if dam %2 == 1 or dam < 0:
        print('No')
        exit()

    pT, pX, pY = l[i]

print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 0
for i in range(1,N+1):
    if i*i <= N:
        ans = max(ans,i*i)
    #else:
        #break
print(ans)

Fixed submission:
N = int(input())
ans = 0
for i in range(1,N+1):
    if i*i <= N:
        ans = max(ans,i*i)
    else:
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
a = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i in S:
    if i in a:
        a.remove(i)
#print(a)
print(a[0])

Fixed submission:
S = input()
a = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i in S:
    if i in a:
        a.remove(i)
#print(a)
print(a[0] if len(a)!=0 else 'None')
Buggy python submission (verdict: Runtime Error):
 N,T = map(int,input().split())
t = list(map(int,input().split()))
ans = T
for i in range(N-1):
    now = t[i+1]-t[i]
    ans += min(now,T)


print(ans)

Fixed submission:
N,T = map(int,input().split())
t = list(map(int,input().split()))
ans = T
for i in range(N-1):
    now = t[i+1]-t[i]
    ans += min(now,T)


print(ans)
Buggy python submission (verdict: Runtime Error):
O,E = input(),input()
ans = ''
for i in range(len(O)):
    ans += O[i] + E[i]
print(ans)

Fixed submission:
O,E = input(),input()
ans = ''

if (len(O)+len(E))%2==0:
    for i in range(len(E)):
        ans += O[i] + E[i]
else:
    for i in range(len(E)):
        ans += O[i] + E[i]
    ans+=O[-1]
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
K,S = map(int,input().split())
ans = 0

for x in range(K+1):
    for y in range(K+1):
        for z in range(K+1):
            if x+y+z==S:
                ans+=1
print(ans)

Fixed submission:
K,S = map(int,input().split())
ans = 0

for x in range(K+1):
    for y in range(K+1):
        z = S-(x+y)
        if 0 <= z <= K:
            ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())
ans = []
for i in range(W):
    ans.append(input())
for j in ans:
    print(j)
    print(j)

Fixed submission:
H,W = map(int,input().split())
ans = []
for i in range(H):
    ans.append(input())
for j in ans:
    print(j)
    print(j)

Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())
c = [input().split() for _ in range(W)]

for i in range(len(c)):
    print(str(c[i]))
    print(str(c[i]))

Fixed submission:
H,W = map(int,input().split())
ans = []
for i in range(H):
    ans.append(input())
for j in ans:
    print(j)
    print(j)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(input().split())
print(a+b[0]+c)

Fixed submission:
l = input().replace(' ','')
print(l[0]+l[7]+l[-7])
Buggy python submission (verdict: Runtime Error):
l = input().replace(' ','')
print(l[0]+l[7]+l[-7])



Fixed submission:
a,b,x = map(int,input().split())
      
print(max(b//x-(a-1)//x,0))
Buggy python submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
A =[0]*M
for i in range(M):
    A[i] = int(input())

amari = 1000000007
cnt = [0]*(N+1)
cnt[0] = 0
cnt[1] = 1
cnt[2] = 2 
for i in range(3,N+1):
    t = (cnt[i-1]+cnt[i-2])
    cnt[i] = t % amari

ans = 1
for i in range(M): 
    if i == 0:
        if A[i] != 1:
            ans*= cnt[A[i]-1]
    elif i > 0 and i < M:
        ans*=cnt[A[i] - A[i-1] - 1]

    if i == M-1:
        if A[i] != N -1:
            ans*= cnt[N - A[i]]
    
    if ans == 0:
        break
  
    ans %= amari

print(ans)

Fixed submission:
N, M = list(map(int, input().split()))
A =[0]*M
for i in range(M):
    A[i] = int(input())

amari = 1000000007
cnt = [0]*(N+2)
cnt[0] = 0
cnt[1] = 1
for i in range(2,N+2):
    t = (cnt[i-1]+cnt[i-2])
    cnt[i] = t % amari

ans = 1
def calc(ans):
    if M == 0:
        return cnt[N+1]

    for i in range(M): 
        if i == 0:
            ans*= cnt[A[i]]
        elif i > 0 and i < M:
            ans*=cnt[A[i] - A[i-1]-1]

        if i == M-1:
            ans*= cnt[N - A[i]]
        
        if ans == 0:
            break
    
        ans %= amari
        
    return ans

print(calc(ans))
Buggy python submission (verdict: Runtime Error):
s = input()
t = s.replace('BC', 'D')
answer = 0
A = 0
for i in range(len(t)):
    if t[i] == 'A':
        A+=1
    elif t[1] == 'D':
        answer+=A
    else:
        A = 0

print(answer)

Fixed submission:
s = input()
t = s.replace('BC', 'D') 
answer = 0
A = 0
for i in range(len(t)):
    if t[i] == 'A':
        A+=1
    elif t[i] == 'D':
        answer+=A
    else:
        A = 0

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

N = int(input())
A = list(map(int, input().split()))

abs_A = [abs(A[i]) for i in A]
ans = 0
if N % 2 == 0:
    ans = sum(abs_A)
else:
    ans = sum(abs_A) - 2*min(abs_A)

print(ans)

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

N = int(input())
A = list(map(int, input().split()))

cnt = 0
abs_A = []
for i in range(N):
    if A[i] < 0:
        cnt += 1
        abs_A.append(-A[i])
    else:
        abs_A.append(A[i])
ans = sum(abs_A)
if cnt % 2 != 0:
    ans -= 2*min(abs_A)

print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()

counts = []
count = 0
for s in S:
    if s == 'A' or s == 'C' or s == 'G' or s == 'T':
        count += 1
    else:
        counts.append(count)
        count = 0

print(max(counts))


Fixed submission:
S = input()

counts = []
count = 0
for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'C' or S[i] == 'G' or S[i] == 'T':
        count += 1
        if i == len(S) - 1:
            counts.append(count)
    else:
        counts.append(count)
        count = 0

print(max(counts))

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

counts = []
count = 0
for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'C' or S[i] == 'G' or S[i] == 'T':
        count += 1
        continue
    else:
        counts.append(count)
        count = 0

print(max(counts))


Fixed submission:
S = input()

counts = []
count = 0
for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'C' or S[i] == 'G' or S[i] == 'T':
        count += 1
        if i == len(S) - 1:
            counts.append(count)
    else:
        counts.append(count)
        count = 0

print(max(counts))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import bisect

N, Q = map(int, input().split())
S = input()

ac_list = []
for i in range(N-1):
    if S[i] == 'A' and S[i+1] == 'C':
        ac_list.append(i)

len_ac = len(ac_list)
for i in range(Q):
    l, r = map(int, input().split())
    left = l-1 if l-1 < len_ac else len_ac
    li_index = bisect.bisect_left(ac_list, l-1, 0, left)
    right = r-1 if r-1 < len_ac else len_ac
    ri_index = bisect.bisect_left(ac_list, r-1, 0, right)
    ans = len(ac_list[li_index:ri_index])
    print(ans)

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

N, Q = map(int, input().split())
S = input()

t = [0] * (N+1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i: i + 2] == 'AC' else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import bisect

N, Q = map(int, input().split())
S = input()

ac_list = []
for i in range(N-1):
    if S[i] == 'A' and S[i+1] == 'C':
        ac_list.append(i)

for i in range(Q):
    l, r = map(int, input().split())
    li_index = bisect.bisect_left(ac_list, l-1)
    ri_index = bisect.bisect_left(ac_list, r-1)
    ans = len(ac_list[li_index:ri_index])
    print(ans)

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

N, Q = map(int, input().split())
S = input()

t = [0] * (N+1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i: i + 2] == 'AC' else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1])
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import bisect

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

price_list = []
stock_list = []
for i in range(N):
    A, B = map(int, input().split())
    index = bisect.bisect_left(price_list, A)
    price_list.insert(index, A)
    stock_list.insert(index, B)

ans = 0
rest = M
for i in range(N):
    if stock_list[i] < rest:
        ans += price_list[i] * stock_list[i]
        rest -= stock_list[i]
    else:
        ans += rest * price_list[i]
        break

print(ans)

Fixed submission:
# -*- coding: utf-8 -*-
from operator import itemgetter


N, M = list(map(int, input().split()))

a = [0] * N
for i in range(N):
    a[i] = list(map(int, input().split()))


def main():
    b = sorted(a, key=itemgetter(0))
    m = 0
    cost = 0
    for i in range(N):
        if (m + b[i][1]) <= M:
            m += b[i][1]
            cost += (b[i][0] * b[i][1])
        else:
            cost += (b[i][0] * (M-m))
            return cost
    return cost


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

N = int(input())
A = [[0] * 3 for i in range(N)]
for a in A:
    a[0], a[1], a[2] = list(map(int, input().split()))


def calc(A):
    for x in range(101):
        for y in range(101):
            h_spots = [0] * N
            for i, a in enumerate(A):
                h_spots[i] = a[2] + abs(x - a[0]) + abs(y - a[1])

            if min(h_spots) == max(h_spots):
                return x, y, h_spots[0]


print(*calc(A))

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

n = int(input())
li = [list(map(int, input().split())) for i in range(n)]
li.sort(key=lambda x: x[2])
a, b, c = li[-1]
for x in range(101):
    for y in range(101):
        h = abs(x-a) + abs(y-b) + c
        if all(k == max(h-abs(x-i)-abs(y-j), 0) for i, j, k in li):
            print(x, y, h)
            exit()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sympy

N, M = list(map(int, input().split()))
F = sympy.divisors(M)

gcd = 0
for i in range(len(F)):
    if F[i] * N > M:
        break

    gcd = F[i]

print(gcd)

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

N, M = list(map(int, input().split()))


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


F = make_divisors(M)
gcd = 0

for i in range(len(F)):
    if F[i] * N > M:
        break

    gcd = F[i]

print(gcd)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N, M, Q = list(map(int, input().split()))

trains = np.zeros((N, N))
for i in range(M):
    l, r = list(map(int, input().split()))
    trains[l-1, r-1] += 1

for j in range(Q):
    p, q = list(map(int, input().split()))
    t = trains[p-1:q, p-1:q]
    print(int(np.sum(t)))


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

trains = [[0]*N for j in range(N)]

for i in range(M):
    l, r = list(map(int, input().split()))
    trains[r-1][l-1] += 1

ans = [[0]*N for j in range(N)]
ans[0][0] = trains[0][0]

for e in range(1, N):  # endのe
    for s in reversed(range(N)):  # startのs
        if s == e:
            ans[e][s] = trains[e][s]
        else:
            ans[e][s] = sum(trains[e][s:]) + ans[e-1][s]


for i in range(Q):
    p, q = list(map(int, input().split()))
    print(ans[q-1][p-1])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N, M, Q = list(map(int, input().split()))

trains = np.zeros((M, N))
for i in range(M):
    l, r = list(map(int, input().split()))
    trains[i, l-1] = 1
    trains[i, r-1] = trains[i, r-1]+1


for j in range(Q):
    p, q = list(map(int, input().split()))
    column_sum = np.sum(trains[:, p-1:q], axis=1)
    a = column_sum[np.where(column_sum == 2)]
    print(np.size(a))


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

trains = [[0]*N for j in range(N)]

for i in range(M):
    l, r = list(map(int, input().split()))
    trains[r-1][l-1] += 1

ans = [[0]*N for j in range(N)]
ans[0][0] = trains[0][0]

for e in range(1, N):  # endのe
    for s in reversed(range(N)):  # startのs
        if s == e:
            ans[e][s] = trains[e][s]
        else:
            ans[e][s] = sum(trains[e][s:]) + ans[e-1][s]


for i in range(Q):
    p, q = list(map(int, input().split()))
    print(ans[q-1][p-1])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N, M, Q = list(map(int, input().split()))

trains = np.zeros((M, N))
# 電車の都市区間が1始まりなことに注意
for i in range(M):
    l, r = list(map(int, input().split()))
    trains[i, l-1] = 1
    trains[i, r-1] = trains[i, r-1]+1


for j in range(Q):
    p, q = list(map(int, input().split()))
    t = trains[:, p-1:q]
    column_sum = np.sum(t, axis=1)
    a = column_sum[np.where(column_sum == 2)]
    print(np.size(a))

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

trains = [[0]*N for j in range(N)]

for i in range(M):
    l, r = list(map(int, input().split()))
    trains[r-1][l-1] += 1

ans = [[0]*N for j in range(N)]
ans[0][0] = trains[0][0]

for e in range(1, N):  # endのe
    for s in reversed(range(N)):  # startのs
        if s == e:
            ans[e][s] = trains[e][s]
        else:
            ans[e][s] = sum(trains[e][s:]) + ans[e-1][s]


for i in range(Q):
    p, q = list(map(int, input().split()))
    print(ans[q-1][p-1])
Buggy python submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

sums = [0]*N
remainders = [0]*M

ans = 0

for i in range(N):
    if i == 0:
        t = A[i] % M
    else:
        t = (A[i] % M + sums[i-1]) % M
    sums[i] = t
    remainders[t] += 1
    ans += remainders[t] if t == 0 else remainders[t] - 1

print(ans)


Fixed submission:
import collections
n, m = map(int, input().split())
A = [int(i) for i in input().split()]

R = [0]
a = 0
for i in range(n):
    a += A[i]
    a %= m
    R.append(a)


def nc2(n):
    return n*(n-1)//2


c = collections.Counter(R)
ans = 0
for r in set(R):
    ans += nc2(c[r])
print(ans)

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

sums = [0]*N
remainders = [0]*M

ans = 0

for i in range(N):
    if i == 0:
        sums[0] = A[i] % M
        t = sums[0]
    else:
        t = (A[i] % M + sums[i-1]) % M
        sums[i] = t
    remainders[t] += 1
    ans += remainders[t] if t == 0 else remainders[t] - 1

print(ans)


Fixed submission:
import collections
n, m = map(int, input().split())
A = [int(i) for i in input().split()]

R = [0]
a = 0
for i in range(n):
    a += A[i]
    a %= m
    R.append(a)


def nc2(n):
    return n*(n-1)//2


c = collections.Counter(R)
ans = 0
for r in set(R):
    ans += nc2(c[r])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

sums = [0 for _ in range(N)]
remainders = [0 for _ in range(M)]

ans = 0

for i in range(N):
    if i == 0:
        sums[0] = A[i] % M
        t = sums[0]
    else:
        t = (A[i] % M + sums[i-1]) % M
        sums[i] = t
    remainders[t] += 1
    ans += remainders[t] if t == 0 else remainders[t] - 1

print(ans)


Fixed submission:
import collections
n, m = map(int, input().split())
A = [int(i) for i in input().split()]

R = [0]
a = 0
for i in range(n):
    a += A[i]
    a %= m
    R.append(a)


def nc2(n):
    return n*(n-1)//2


c = collections.Counter(R)
ans = 0
for r in set(R):
    ans += nc2(c[r])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
D, G = list(map(int, input().split()))

G /= 100
l = [[0]*3 for i in range(D)]

for i in range(D):
    p, c = list(map(int, input().split()))
    l[i][0] = i+1
    l[i][1] = p
    l[i][2] = c/100

l = sorted(l, key=lambda x: x[0], reverse=True)


def dfs(i, scores):
    if scores <= 0:
        return 0

    if i == D:
        return 1e9

    a, p, b = l[i]

    counts = [1e9]*(p+1)
    for j in range(p+1):
        if j == p:
            counts[j] = dfs(i+1, scores-a*p-b) + p
        elif scores-a*j >= 0:
            counts[j] = dfs(i+1, scores-a*j) + j

    ans = min(counts)
    return ans


ans = dfs(0, G)

print(ans)


Fixed submission:
from math import ceil

D, G = [int(t) for t in input().split()]
p = []
c = []
for i in range(D):
    p_, c_ = [int(t) for t in input().split()]
    p.append(p_)
    c.append(c_)


def minsolve(G, i):
    """100i点以下の問題だけでGを達成する最小問題数"""
    if i <= 0:
        return float('inf')
    n = min(ceil(G / (100 * i)), p[i-1])
    s = 100 * i * n
    if n == p[i-1]:
        s += c[i-1]
    m = n if s >= G else n + minsolve(G - s, i-1)
    return min(m, minsolve(G, i-1))


print(minsolve(G, D))
Buggy python submission (verdict: Runtime Error):
import bisect as bi

N = int(input())
A = [int(t) for t in input().split()]

A = sorted([A[i]-i-1 for i in range(N)])

nega_cnt = bi.bisect_left(A, 0)
posi_cnt = N - bi.bisect_right(A, 0)
zero_cnt = N - nega_cnt - posi_cnt


def calc():
    if nega_cnt + zero_cnt >= posi_cnt and posi_cnt + zero_cnt >= nega_cnt:
        return sum([abs(t) for t in A])

    if posi_cnt > nega_cnt + zero_cnt:
        idx = (posi_cnt-(nega_cnt + zero_cnt) - 1) // 2 + 1
        a = A[-posi_cnt:][idx]
        return sum([abs(t-a) for t in A])

    if posi_cnt + zero_cnt < nega_cnt:
        idx = (nega_cnt-(posi_cnt + zero_cnt))//2 + 1
        a = A[:nega_cnt][-idx]
        return sum([abs(t-a) for t in A])


print(calc())


Fixed submission:
import bisect as bi

N = int(input())
A = [int(t) for t in input().split()]

A = sorted([A[i]-i-1 for i in range(N)])

nega_cnt = bi.bisect_left(A, 0)
posi_cnt = N - bi.bisect_right(A, 0)
zero_cnt = N - nega_cnt - posi_cnt


def calc():
    if nega_cnt + zero_cnt >= posi_cnt and posi_cnt + zero_cnt >= nega_cnt:
        return sum([abs(t) for t in A])

    if posi_cnt > nega_cnt + zero_cnt:
        idx = (posi_cnt-(nega_cnt + zero_cnt)) // 2 + 1
        a = A[-posi_cnt:][idx-1]
        return sum([abs(t-a) for t in A])

    if posi_cnt + zero_cnt < nega_cnt:
        idx = (nega_cnt-(posi_cnt + zero_cnt))//2 + 1
        a = A[:nega_cnt][-idx]
        return sum([abs(t-a) for t in A])


print(calc())
Buggy python submission (verdict: Runtime Error):
import math
N, K = [int(t) for t in input().split()]
A = [int(t) for t in input().split()]

idx = A.index(1)
left = A[:idx+1]
right = A[idx:]


def get_cnt(L):
    return math.ceil((len(L) - 1) / (K-1))


if left + 1 < K or N - right < K:
    print(get_cnt(A))
else:
    print(get_cnt(left) + get_cnt(right))


Fixed submission:
import math
N, K = [int(t) for t in input().split()]
A = [int(t) for t in input().split()]

print(math.ceil((N - 1) / (K-1)))
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()] 
if a[0] == 1:
  a[0] = a[0] +13
if a[1] ==1:
  a[1] = a[1] + 13
if a[0] > a[1]:
  print("Alice")
elif a[0] < a[1]:
  print("Bob")
else
  print("Draw")

Fixed submission:
a = [int(i) for i in input().split()] 
if a[0] == 1:
  a[0] = a[0] + 13

if a[1] == 1:
  a[1] = a[1] + 13

  
if a[0] > a[1]:
  print("Alice")
elif a[0] < a[1]:
  print("Bob")
else:
  print("Draw")
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()] 
sum = 0
if (a[0] == a[1]):
  if (a[0] == a[2]):
  	sum = 1
  else:
    sum = 2
elif (a[0] === a[2]):
  sum = 1
elif (a[1] === a[2]):
  sum = 1
else:
  sum = 0
  
print(sum)

Fixed submission:
a = [int(i) for i in input().split()] 

if (a[0] == a[1]):
  if (a[1] == a[2]):
    sum = 1
  else:
    sum = 2
elif (a[0] == a[2]):
  sum = 2
elif (a[1] == a[2]):
  sum = 2
else:  
  sum = 3

print(sum)
Buggy python submission (verdict: Runtime Error):
l = map(int, raw_input().split())

a = 0
b = 0
for i in len(l):
  if l[i] == 5:
    a = a + 1
  elif l[i] == 7:
    b = b + 1

if (a==2 or b ==1):
  print("Yes")
else:
  print("No")
 

Fixed submission:
l = [int(i) for i in input().split()]

a = 0
b = 0
for i in range(len(l)):
  if (l[i] == 5):
    a = a + 1
  elif (l[i]) == 7:
    b = b + 1
  else:
    pass

if (a==2 and b ==1):
  print("YES")
else:
  print("NO")