Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
primes = [0, 0] + [1]*996
for i in range(2, 32):
    if primes[i]:
        for j in range(i*i, 998, i):
            primes[j] = 0
while True:
    n = int(input())
    if n == 0:
        break
    m = n
    while not primes[m]:
        m -= 1
    pnum = [i for i in range(m+1) if primes[i]]
    ans = 0
    for i in range(len(pnum)):
        tmp = 0
        for j in range(i, len(pnum)):
            tmp += pnum[j]
            if tmp == n:
                ans += 1
                break
            if tmp > n:
                break
    print(ans)

Fixed submission:
primes = [0, 0] + [1]*9999
for i in range(2, 101):
    if primes[i]:
        for j in range(i*i, 10001, i):
            primes[j] = 0
pnums = [i for i in range(10001) if primes[i]]
while True:
    n = int(input())
    if n == 0:
        break
    m = n
    while not primes[m]:
        m -= 1
    ans = 0
    end = pnums.index(m)+1
    for i in range(end):
        tmp = 0
        for j in range(i, end):
            tmp += pnums[j]
            if tmp == n:
                ans += 1
                break
            if tmp > n:
                break
    print(ans)

Buggy python submission (verdict: Runtime Error):
primes = [0, 0] + [1]*999
for i in range(2, 32):
    if primes[i]:
        for j in range(i*i, 1001, i):
            primes[j] = 0
while True:
    n = int(input())
    if n == 0:
        break
    m = n
    while not primes[m]:
        m -= 1
    pnum = [i for i in range(m+1) if primes[i]]
    ans = 0
    for i in range(len(pnum)):
        tmp = 0
        for j in range(i, len(pnum)):
            tmp += pnum[j]
            if tmp == n:
                ans += 1
                break
            if tmp > n:
                break
    print(ans)

Fixed submission:
primes = [0, 0] + [1]*9999
for i in range(2, 101):
    if primes[i]:
        for j in range(i*i, 10001, i):
            primes[j] = 0
pnums = [i for i in range(10001) if primes[i]]
while True:
    n = int(input())
    if n == 0:
        break
    m = n
    while not primes[m]:
        m -= 1
    ans = 0
    end = pnums.index(m)+1
    for i in range(end):
        tmp = 0
        for j in range(i, end):
            tmp += pnums[j]
            if tmp == n:
                ans += 1
                break
            if tmp > n:
                break
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n, m = map(int, input().split())
e = [int(input()) for _ in range(m)]
d = deque(i for i in range(1, n+1))
for v in e[::-1]:
    try:
        d.remove(v)
        print(v)
    except ValueError:
        pass
while d:
    print(d.popleft())

Fixed submission:
n, m = map(int, input().split())
e = [int(input()) for _ in range(m)]
b = [1] * (n+1)
for v in e[::-1]:
    if b[v]:
        b[v] = 0
        print(v)
for i in range(1, n+1):
    if b[i]:
        print(i)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n, m = map(int, input().split())
e = [int(input()) for _ in range(m)]
d = deque(i for i in range(1, n+1))
for v in e[::-1]:
    try:
        d.remove(v)
        print(v)
    except ValueError:
        pass
while d:
    print(d.popleft())

Fixed submission:
n, m = map(int, input().split())
e = [int(input()) for _ in range(m)]
b = [1] * (n+1)
for v in e[::-1]:
    if b[v]:
        b[v] = 0
        print(v)
for i in range(1, n+1):
    if b[i]:
        print(i)
Buggy python submission (verdict: Runtime Error):
t = int(input())
for _ in range(t):
    n = int(input())
    h = list(map(int, input().split()))
    maxv = 0, minv = 0
    for i in range(len(h)-1):
        maxv = max(maxv, h[i+1]-h[i])
        minv = max(minv, h[i]-h[i+1])
    print(maxv, minv)

Fixed submission:
t = int(input())
for _ in range(t):
    n = int(input())
    blocks = list(map(int, input().split()))
    maxv = minv = 0
    for i in range(1, n):
        maxv = max(maxv, blocks[i] - blocks[i-1])
        minv = max(minv, blocks[i-1] - blocks[i])
    print(maxv, minv)
Buggy python submission (verdict: Time Limit Exceeded):
def nCm(n, k):
    C = [1] + [0 for i in range(1, k+1)]
    for i in range(1, n+1):
        j = min(i, k)
        while j > 0:
            C[j] += C[j-1]
            j -= 1
    return C[k]

n = int(input())
k = 1
while nCm(n, k) % 2:
    k += 1
print(k)

Fixed submission:
n = int(input()) + 1
print(n &- n)
Buggy python submission (verdict: Runtime Error):
from math import gcd
x, y = map(int, input().split())
print(gcd(x, y))

Fixed submission:
x, y = map(int, input().split())
while y>0: x, y = y, x%y
print(x)

Buggy python submission (verdict: Runtime Error):
from math import gcd
x, y = map(int, input().split())
print(gcd(x, y))

Fixed submission:
x, y = map(int, input().split())
while y>0: x, y = y, x%y
print(x)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = []
for _ in range(n):
    ss = input().split()
    order, string = ss[0], ss[1]
    if order == "insert":
        l.append(string)
    else:
        print('yes' if string in l else 'no')

Fixed submission:
n = int(input())
l = {}
for _ in range(n):
    ss = input().split()
    order, string = ss[0], ss[1]
    if order == "insert":
        l[string] = 1
    else:
        print('yes' if string in l else 'no')

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n = int(input())
l = deque()
for _ in range(n):
    ss = input().split()
    order, string = ss[0], ss[1]
    if order == "insert":
        l.append(string)
    else:
        print('yes' if string in l else 'no')

Fixed submission:
n = int(input())
l = {}
for _ in range(n):
    ss = input().split()
    order, string = ss[0], ss[1]
    if order == "insert":
        l[string] = 1
    else:
        print('yes' if string in l else 'no')
Buggy python submission (verdict: Runtime Error):
def partition(A, p, r):
    x = A[r]
    i = p-1
    for j in range(p, r):
        if A[j] <= x:
            i += 1
            A[i], A[j] = A[j], A[i]
    A[i+1], A[r] = A[r], A[i+1]
    return i+1

n = int(input())
A = list(map(int, input().split()))
i = partition(A, 0, n)
A[i] = "["+str(A[i])+"]"
print(*A)

Fixed submission:
def partition(A, p, r):
    x = A[r]
    i = p-1
    for j in range(p, r):
        if A[j] <= x:
            i += 1
            A[i], A[j] = A[j], A[i]
    A[i+1], A[r] = A[r], A[i+1]
    return i+1

n = int(input())
A = list(map(int, input().split()))
i = partition(A, 0, n-1)
A[i] = "["+str(A[i])+"]"
print(*A)
Buggy python submission (verdict: Runtime Error):
dice = {v: k for k, v in enumerate(list(map(int, input().split())))}
adjacent = {k: v for k, v in enumerate(sorted(dice.keys()))}
q = int(input())
p = [(-1,2,4,1,3,-1),(3,-1,0,5,-1,2),(1,5,-1,-1,0,4),(4,0,-1,-1,5,1),(2,-1,5,0,-1,3),(-1,3,1,4,2,-1)]
for _ in range(q):
    top, front = map(int, input().split())
    x = dice[top]
    print(adjacent[p[x][front-1]])

Fixed submission:
dice = {v: k for k, v in enumerate(list(map(int, input().split())))}
adjacent = {k: v for k, v in enumerate(sorted(dice.keys()))}
q = int(input())
p = [(-1,2,4,1,3,-1),(3,-1,0,5,-1,2),(1,5,-1,-1,0,4),(4,0,-1,-1,5,1),(2,-1,5,0,-1,3),(-1,3,1,4,2,-1)]
for _ in range(q):
    top, front = map(int, input().split())
    x = dice[top]
    y = dice[front]
    print(adjacent[p[x][y]])

Buggy python submission (verdict: Runtime Error):
dice = {v: k for k, v in enumerate(list(map(int, input().split())))}
adjacent = {k: v for k, v in enumerate(sorted(dice.keys()))}
q = int(input())
p = [(-1,2,4,1,3,-1),(3,-1,0,5,-1,2),(1,5,-1,-1,0,4),(4,0,-1,-1,5,1),(2,-1,5,0,-1,3),(-1,3,1,4,2,-1)]
for _ in range(q):
    top, front = map(int, input().split())
    x = dice[top]
    y = dice[front-1]
    print(adjacent[p[x][y])

Fixed submission:
dice = {v: k for k, v in enumerate(list(map(int, input().split())))}
adjacent = {k: v for k, v in enumerate(sorted(dice.keys()))}
q = int(input())
p = [(-1,2,4,1,3,-1),(3,-1,0,5,-1,2),(1,5,-1,-1,0,4),(4,0,-1,-1,5,1),(2,-1,5,0,-1,3),(-1,3,1,4,2,-1)]
for _ in range(q):
    top, front = map(int, input().split())
    x = dice[top]
    y = dice[front]
    print(adjacent[p[x][y]])
Buggy python submission (verdict: Runtime Error):
x = input()
print(x*x*x)

Fixed submission:
x = int(input())
print(x*x*x)
Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = map(int, input().split())
    if (m, f, r) = (-1, -1, -1):
        break
    if m+f >= 80:
        print("A")
    elif m+f >= 65 and m+f < 80:
        print("B")
    elif m+f >= 50 and m+f < 65:
        print("C")
    elif m+f >= 30 and m+f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

Fixed submission:
while True:
    m, f, r = map(int, input().split())
    if (m, f, r) == (-1, -1, -1):
        break
    if m == -1 or f == -1:
        print("F")
    elif m+f >= 80:
        print("A")
    elif m+f >= 65 and m+f < 80:
        print("B")
    elif m+f >= 50 and m+f < 65:
        print("C")
    elif m+f >= 30 and m+f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")
Buggy python submission (verdict: Runtime Error):
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
C = [[0 for i in range(n)] for j in range(l)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))

Fixed submission:
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
C = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))

Buggy python submission (verdict: Runtime Error):
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
C = [[0 for i in range(n)] for j in range(l)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))

Fixed submission:
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
C = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))
Buggy python submission (verdict: Runtime Error):
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if ord(t[0]) > ord(h[0]):
        st += 3
    elif ord(t[0]) < ord(h[1]):
        sh += 3
    else:
        m = h if len(t) > len(h) else t
        l = 1
        for j in range(m):
            if ord(t[j]) > ord(h[j]):
                st += 3
                j = m
                l = 0
            else:
                sh += 3
                j = m
                l = 0
        if l:
            st += 1
            sh += 1
print(st, sh)

Fixed submission:
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if t > h:
        st += 3
    elif t < h:
        sh += 3
    else:
        st += 1
        sh += 1
print(st, sh)

Buggy python submission (verdict: Runtime Error):
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if ord(t[0]) > ord(h[0]):
        st += 3
    elif ord(t[0]) < ord(h[0]):
        sh += 3
    else:
        m = h if len(t) > len(h) else t
        l = 1
        for j in range(m):
            if ord(t[j]) > ord(h[j]):
                st += 3
                j = m
                l = 0
            else:
                sh += 3
                j = m
                l = 0
        if l:
            st += 1
            sh += 1
print(st, sh)

Fixed submission:
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if t > h:
        st += 3
    elif t < h:
        sh += 3
    else:
        st += 1
        sh += 1
print(st, sh)
Buggy python submission (verdict: Time Limit Exceeded):
m, n = map(int, input().split())
print(divmod(pow(m, n), 1000000007)[1])

Fixed submission:
m, n = map(int, input().split())
print(pow(m, n, 1000000007))
Buggy python submission (verdict: Runtime Error):
def srch(i, l, Lng, Dst):
    if Lng[i] > l:
        Lng[i] = l
        
    if Dst[i] is not None and len(Dst[i]) > 0:
        for c in Dst[i]:
            srch(c,l+1, Lng, Dst)

def main():
    num = int(input())
    Dst = [None for i in range(num + 1)]
    Lng = [999] * (num + 1)

    for n in range(1, num+1):
        a = list(map(int,input().split()))
        u = a[0]
        if a[1] > 0:
            Dst[u] = a[2:]

    srch(1, 0, Lng, Dst)

    for n in range(1, num+1):
        l = Lng[n]
        if l > num:
            l = -1
        print("{} {}".format(n,l))

if __name__ == '__main__':
    main()

Fixed submission:
def srch(i, l, Lng, Dst):
    if Lng[i] != -1 and Lng[i] < l:
        return
    Lng[i] = l
    if Dst[i] is not None and len(Dst[i]) > 0:
        for c in Dst[i]:
            srch(c,l+1, Lng, Dst)

def main():
    num = int(input())
    Dst = [None for i in range(num + 1)]
    Lng = [-1] * (num + 1)
    
    for n in range(1, num+1):
        a = list(map(int,input().split()))
        u = a[0]
        if a[1] > 0:
            Dst[u] = a[2:]

    srch(1, 0, Lng, Dst)

    for n in range(1, num+1):
        l = Lng[n]
        if l > num:
            l = -1
        print("{} {}".format(n,l))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
?????§?????????
FX????????§????????°?????????????????¨????????????????????¨??§????????????????????????????????¨?????§????????????
????????°????????????100???????????? 1000???????????????????????????????????? 1?????? 108???????????£??????????£??????¨???
(108??? ?????? 100???) ???? 1000?????? == 8000??????????????????????????¨?????§????????????

???????????¨????????????????????? t ?????????????????? Rt (t=0,1,2,,,n???1)???
??\?????¨??????????????????????????§??????????????? Rj???Ri (????????????j>i ??¨??????) ????????§??????
?±??????????????????????
"""
import math

# ?????????
n = int(input().strip())
a = []
for i in range(n):
    a.append(int(input().strip()))
cnt = -1000000000
for j in range(1,n):
    for i in range(0,j):
        x = a[j] - a[i]
        if cnt < x:
            cnt = x
print(cnt)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
?????§?????????
FX????????§????????°?????????????????¨????????????????????¨??§????????????????????????????????¨?????§????????????
????????°????????????100???????????? 1000???????????????????????????????????? 1?????? 108???????????£??????????£??????¨???
(108??? ?????? 100???) ???? 1000?????? == 8000??????????????????????????¨?????§????????????

???????????¨????????????????????? t ?????????????????? Rt (t=0,1,2,,,n???1)???
??\?????¨??????????????????????????§??????????????? Rj???Ri (????????????j>i ??¨??????) ????????§??????
?±??????????????????????
"""
import math

# ?????????
cnt = -1000000000

n = int(input().strip())
min = int(input().strip())

for i in range(1,n):
    a =int(input().strip())
    x = a - min
    if cnt < x:
        cnt = x
    if min > a:
        min = a
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Binary Search
n ????????´??°???????????°??? S ??¨???q ????????°????????´??°???????????°??? T ??????????????????
T ?????????????????´??°????????§ S ?????????????????????????????° C ???????????????????????°????????????????????????????????????
"""
def bsrch(l, a):
    """ ????????????????????? """
    c = int(len(l) / 2)
    if l[c] == a:
        return True
    else:
        if c > 0:
            if l[c] > a:
                return bsrch(l[:c], a)
            elif l[c] < a:
                return bsrch(l[c:], a)
    return False

def main():
    """ ????????? """
    n = int(input())
    S = list(map(int,input().split()))
    q = int(input())
    T = list(map(int,input().split()))

    cnt = {}

    for j in range(q):
       x = bsrch(S, T[j])
       if x == True:
           cnt[T[j]] = 1
    print(len(cnt))

if __name__ == '__main__':
    main()

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Binary Search
n ????????´??°???????????°??? S ??¨???q ????????°????????´??°???????????°??? T ??????????????????
T ?????????????????´??°????????§ S ?????????????????????????????° C ???????????????????????°????????????????????????????????????
"""
def bsrch(l, s, e, a):
    """ ????????????????????? """
    c = int((e - s) / 2) + s if e - s > 1 else s
    x = l[c]
#    print(l[s:e])
#    print("s:{} e:{} c:{} a:{}".format(s,e,c,a))
    if x == a:
        return True
    else:
        if c > s:
            if x < a:
                return bsrch(l, c, e, a)
            elif x > a:
                return bsrch(l, s, c, a)
    return False

def main():
    """ ????????? """
    n = int(input())
    S = list(map(int,input().split()))
    q = int(input())
    T = list(map(int,input().split()))

    cnt = {}
    for j in range(q):
       x = bsrch(S, 0, n, T[j])
       if x == True:
           cnt[T[j]] = 1
    print(len(cnt))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    """ ????????? """
    num = int(input().strip())
    A = list(map(int,input().split()))
    cnt = 0
    for i in range(num-1):
        for j in range(i,num):
            if i > j:
                cnt++
    if cnt % 2 == 0:
        cnt += 1
    else:
        cnt -= 1
    print(cnt)

if __name__ == '__main__':
    main()

Fixed submission:
MAX = 1000000001

def merge(A, left, mid, right, cnt):
    n1 = mid - left
    n2 = right - mid
    L = A[left:mid]
    R = A[mid:right]
    ls = len(L)
    L.append(MAX)
    R.append(MAX)
    
    i = 0
    j = 0
    for k in range(left, right):
        if L[i] <= R[j]:
            A[k] = L[i]
            i = i + 1
        else:
            A[k] = R[j]
            cnt += ls - i
            j = j + 1
    return cnt

def mergeSort(A, left, right, cnt):
    if left + 1 < right:
        mid = int((left + right) / 2)
        cnt = mergeSort(A, left, mid, cnt)
        cnt = mergeSort(A, mid, right, cnt)
        cnt = merge(A, left, mid, right, cnt)
    return cnt

def main():
    """ ????????? """
    num = int(input().strip())
    A = list(map(int,input().split()))
#    print(A)
    cnt = mergeSort(A, 0, num, 0)
    print(cnt)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    """ ????????? """
    num = int(input().strip())
    A = list(map(int,input().split()))
    cnt = 0
    for i in range(num-1):
        for j in range(i,num):
            if A[i] > A[j]:
                cnt+= 1

    print(cnt)

if __name__ == '__main__':
    main()

Fixed submission:
MAX = 1000000001

def merge(A, left, mid, right, cnt):
    n1 = mid - left
    n2 = right - mid
    L = A[left:mid]
    R = A[mid:right]
    ls = len(L)
    L.append(MAX)
    R.append(MAX)
    
    i = 0
    j = 0
    for k in range(left, right):
        if L[i] <= R[j]:
            A[k] = L[i]
            i = i + 1
        else:
            A[k] = R[j]
            cnt += ls - i
            j = j + 1
    return cnt

def mergeSort(A, left, right, cnt):
    if left + 1 < right:
        mid = int((left + right) / 2)
        cnt = mergeSort(A, left, mid, cnt)
        cnt = mergeSort(A, mid, right, cnt)
        cnt = merge(A, left, mid, right, cnt)
    return cnt

def main():
    """ ????????? """
    num = int(input().strip())
    A = list(map(int,input().split()))
#    print(A)
    cnt = mergeSort(A, 0, num, 0)
    print(cnt)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys

def swap(A, i, j):
    x = A[i]
    A[i] = A[j]
    A[j] = x

def partition(A, p, r, idx):
    x = A[r][idx]                # 1 x = A[r]
    i = p - 1                    # 2 i = p-1
    for j in range(p, r):        # 3 for j = p to r-1
        if A[j][idx] <= x:       # 4     if A[j] <= x
            i += 1               # 5        then i = i+1
            if(i != j):
                swap(A, i, j)    # 6        exchange A[i] and A[j] 
    i += 1 
    swap(A, i, r)                # 7 exchange A[i+1] and A[r]
    return i                     # 8 return i+1

def quickSort(A, p, r, idx):
    if p < r:
        q = partition(A, p, r, idx)
        quickSort(A, p, q - 1, idx)
        quickSort(A, q + 1, r, idx)

def main():
    """ ????????? """
    num = int(input().strip())
    istr = sys.stdin.read()
    cards = list(istr.splitlines())
    
    A = [[0,0] for i in range(num)]
    B = [[0,0] for i in range(num)]
    
    for i in range(num):
        A[i][0] = cards[i][0]
        A[i][1] = int(cards[i][2:])
        B[i][0] = cards[i][0]
        B[i][1] = int(cards[i][2:])

    quickSort(A, 0, num-1,1)
    B.sort(key = lambda d:d[1])
    res = "Stable"
    for i in range(num):
        if A[i][0] != B[i][0] or A[i][1] != B[i][1]:
            res = "Not stable"
            break

    print(res)
    for x in A:
        print(" ".join(map(str, x)))

if __name__ == '__main__':
    main()

Fixed submission:
def swap(A, i, j):
#    print("\tswap Aj:{} Ai:{}\n".format(A[j], A[i]))
    x = A[i]
    A[i] = A[j]
    A[j] = x

def partition(A, p, r):
    x = A[r]
    i = p - 1
    for j in range(p, r):
        if A[j] <= x:
            i += 1
            swap(A, i, j)
#        print("j:{} Aj:{} i:{} Ai:{} Ar:{}".format(j, i, A[j], A[i], A[r]))
#        print(A)
#        print(" ")
    A[r] = "[{}]".format(A[r])
    swap(A,i+1, r)
    i += 1
    return i

def main():
    """ ????????? """
    num = int(input().strip())
    A = list(map(int,input().split()))
    partition(A, 0, num-1)
    print(" ".join(map(str,A)))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
?????¢
"""
import math
x1, y1, x2, y2 = map(int,input().strip().split())
x = x1 - x2
y = y1 - y2

distance = math.sqrt(x * x + y * y)

print(distance)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
?????¢
"""
import math
x1, y1, x2, y2 = map(float,input().strip().split())
x = x1 - x2
y = y1 - y2

distance = math.sqrt(x * x + y * y)

print(distance)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
for c in range(3000):
    l = input().strip().split()
    x = int(l[0])
    y = int(l[1])
    if(x < 1 and y < 0):
        break
    elif(x > y):
        print("Case {0}: {1}".format(y,x))
    else:
        print("Case {0}: {1}".format(x,y))

Fixed submission:
# -*- coding: utf-8 -*-
for c in range(3000):
    l = input().strip().split()
    x = int(l[0])
    y = int(l[1])
    if((x < 1) and (y < 1)):
        break
    elif(x > y):
        print("{0} {1}".format(y,x))
    else:
        print("{0} {1}".format(x,y))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
r = int(input().strip())
p = 3.14159265
m = r * r * p
l = 2 * r * p
print("{0:.6f} {1:.6f}".format(m,l))

Fixed submission:
# -*- coding: utf-8 -*-
r = float(input().strip())
p = 3.141592653589793238
m = r * r * p
l = 2 * r * p
print("{0:.6f} {1:.6f}".format(m,l))