Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

a = [[] for _ in range(n)]
for i in range(n):
  a[i] = list(map(int, input().split()))
  b = [0 for _ in range(m)]
  for i in range(m):
    b[i] = int(input())
    for i in range(n):
      d = 0
      for j in range(m):
        d += a[i][j]*b[j]
        
      print(d)


Fixed submission:
n, m = map(int, input().split())
a = [[] for _ in range(n)]

for i in range(n):
  a[i] = list(map(int, input().split()))
  
b = [0 for _ in range(m)]
for i in range(m):
  b[i] = int(input())
  
for i in range(n):
    d = 0
    
    for j in range(m):
      d += a[i][j]*b[j]
        
    print(d)
Buggy python submission (verdict: Runtime Error):
x = input()
print(x*x*x)




Fixed submission:
x = int(input())
print(x**3)

Buggy python submission (verdict: Runtime Error):
x = int(inut())
print(x*x*x)



Fixed submission:
x = int(input())
print(x**3)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a < b && b < c:
   print("Yes")
else:
   print("No")



Fixed submission:
a, b, c = map(int, input().split())
if a < b and b < c:
   print("Yes")
else:
   print("No")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a < b and b < c:
   print("Yes")
else:
   prin("No")



Fixed submission:
a, b, c = map(int, input().split())
if a < b and b < c:
   print("Yes")
else:
   print("No")
Buggy python submission (verdict: Runtime Error):
#!/bin/env python3
from __future__ import division, print_function
try:
    input = raw_input
    range = xrange
except NameError:
    pass
# 上記のコードはPython2とPython3の違いを一部吸収するためのもの


def main():
    value = [0] * 1000
    weight = [0] * 1000
    casenum = 1
    while True:
        W = int(input())
        if(W == 0):
            return
        N = int(input())
        dp = [[0 for x in range(W+1)] for y in range(N+1)]
        for x in range(0, N):
            value[x], weight[x] = map(int, input().split(','))
        for i in range(0, N):
            for w in range(0, W+1):
                if w - weight[i] >= 0:
                    use = dp[i][w - weight[i]] + value[i]
                else:
                    use = 0
                unuse = dp[i][w]
                dp[i+1][w] = max(use, unuse)
        print("Case " + str(casenum) + ":")
        for w in range(W+1):
            if(dp[N][w] == dp[N][W]):
                print(str(dp[N][w]) + "\n" + str(w))
                break
        casenum += 1
main()

Fixed submission:
#!/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import division, print_function
try:
    input = raw_input
    range = xrange
except NameError:
    pass
# 上記のコードはPython2とPython3の違いを一部吸収するためのもの


def main():
    value = [0] * 1000
    weight = [0] * 1000
    casenum = 1
    while True:
        W = int(input())
        if(W == 0):
            return
        N = int(input())
        dp = [[0 for x in range(W+1)] for y in range(N+1)]
        for x in range(0, N):
            value[x], weight[x] = map(int, input().split(','))
        for i in range(0, N):
            for w in range(0, W+1):
                if w - weight[i] >= 0:
                    use = dp[i][w - weight[i]] + value[i]
                else:
                    use = 0
                unuse = dp[i][w]
                dp[i+1][w] = max(use, unuse)
        print("Case " + str(casenum) + ":")
        for w in range(W+1):
            if(dp[N][w] == dp[N][W]):
                print(str(dp[N][w]) + "\n" + str(w))
                break
        casenum += 1
main()
Buggy python submission (verdict: Time Limit Exceeded):
import heapq

def main():
    q = []
    heapq.heapify(q)
    while True:
        s = input().split()
        if s[0] == 'end':
            break
        elif s[0] == 'insert':
            heapq.heappush(q, (-int(s[1]), int(s[1])))
        else:
            p = heapq.heappop(q)
            print(p[1])

if __name__ == '__main__':
    main()


Fixed submission:
import heapq

def main():
    q = []
    heapq.heapify(q)
    while True:
        s = input().split()
        if s[0] == 'end':
            break
        elif s[0] == 'insert':
            heapq.heappush(q, -int(s[1]))
        else:
            p = heapq.heappop(q)
            print(-p)

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

class UnionFindTree:

    def __init__(self):
        self.cnt = []
        self.par = []

    def add(self, n):
        assert n == len(self.par), "Invalid Value"
        self.par.append(n)
        self.cnt.append(1)

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.cnt[x] = self.cnt[x] + self.cnt[y]
            self.cnt[y] = self.cnt[x]
            self.par[x] = y

    def size(self, x):
        x = self.find(x)
        return self.cnt[x]


def main():
    n, q = map(int, input().split())
    uf = UnionFindTree()
    for i in range(n):
        uf.add(i)
    for _ in range(q):
        com, x, y = map(int, input().split())
        if com == 0:
            uf.unite(x, y)
        else:
            print(1 if uf.same(x, y) else 0)


if __name__ == '__main__':
    main()



Fixed submission:

class UnionFindTree:

    def __init__(self):
        self.cnt = []
        self.par = []

    def add(self, n):
        assert n == len(self.par), "Invalid Value"
        self.par.append(n)
        self.cnt.append(1)

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

    def same(self, x, y):
        return self.root(x) == self.root(y)

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            cnt = self.cnt[x] + self.cnt[y]
            self.cnt[x] = cnt
            self.cnt[y] = cnt
            if x < y:
                self.par[y] = x
            else:
                self.par[x] = y

    def size(self, x):
        x = self.root(x)
        return self.cnt[x]


def main():
    n, q = map(int, input().split())
    uf = UnionFindTree()
    for i in range(n):
        uf.add(i)
    for _ in range(q):
        com, x, y = map(int, input().split())
        if com == 0:
            uf.unite(x, y)
        else:
            print(1 if uf.same(x, y) else 0)


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


def sieve(ks):
    rejected_set = {x for x in ks for i in range(
        1, x) for j in range(i, x) if i + j + 2 * i * j == x}
    return {2} | {2 * y + 1 for y in (ks - rejected_set)}


def number_of_primes(n):
    return len({p for p in sieve(set(range(1, n + 1))) if p <= n})


def main():
    raw_args = []
    while True:
        try:
            raw_args.append(input())
        except EOFError as e:
            break
    for n in map(int, raw_args):
        print(number_of_primes(n))

if __name__ == "__main__":
    main()

Fixed submission:
#!/usr/bin/env python3

"""Enumerates primes in an interval.

Verification: [0009](https://onlinejudge.u-aizu.ac.jp/status/users/hamukichi/submissions/1/0009/judge/4571021/Python3)
"""


import math
import sys


def segment_sieve(begin, end):
    """Enumerates the prime numbers in [`begin`, `end`).

    Returns (as a tuple):

    - `is_prime`: a list of bool values.
      If an integer `i` is a prime number, then `is_prime[i - begin]` is True.
      Otherwise `is_prime[i -begin]` is False.
    - `primes`: a list of prime numbers in [`begin`, `end`).
    """

    assert 1 < begin <= end
    sqrt_end = math.ceil(math.sqrt(end))
    is_prime_small = [True for i in range(sqrt_end)]
    is_prime_small[0] = False
    is_prime_small[1] = False
    is_prime = [True for i in range(end - begin)]
    for i in range(2, sqrt_end):
        if is_prime_small[i]:
            for j in range(2 * i, sqrt_end, i):
                is_prime_small[j] = False
            for k in range(max(2, (begin + i - 1) // i) * i, end, i):
                is_prime[k - begin] = False
    primes = [i for i, cond in enumerate(is_prime, begin) if cond]
    return is_prime, primes


def main():
    ns = [int(n) for n in sys.stdin.readlines()]
    max_n = max(ns)
    begin = 2
    is_prime, _ = segment_sieve(begin, max_n + 1)
    for n in ns:
        print(sum(is_prime[:n + 1 - begin]))


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

import math


def isprime(n):
    if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        for i in range(3, math.floor(math.sqrt(n)), 2):
            if x % i == 0:
                return False
        else:
            return True


def main():
    n = int(input())
    ms = (int(input()) for i in range(n))
    print(len(list(filter(isprime, ms))))

if __name__ == "__main__":
    main()

Fixed submission:
#!/usr/bin/env python3

"""Determines whether an input integer is prime, by trial division.

Verification: [ALDS1_1_C](https://onlinejudge.u-aizu.ac.jp/status/users/hamukichi/submissions/1/ALDS1_1_C/judge/4573080/Python3)
"""


def is_prime_trial_division(n):
    """Determing whether the given integer `n` is prime by trial division.

    """

    assert n > 0
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True


def count_primes(ms):
    return sum(is_prime_trial_division(m) for m in ms)


def main():
    n = int(input())
    ms = [int(input()) for _ in range(n)]
    print(count_primes(ms))


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

import collections


def process(commands):
    queue = collections.deque()
    for c in commands:
        if "insert" in c:
            queue.appendleft(int(c[7:]))
        elif "deleteFirst" in c:
            _ = queue.popleft()
        elif "deleteLast" in c:
            _ = queue.pop()
        elif "delete" in c:
            queue.remove(int(c[7:]))
    print(" ".join(list(map(str, queue))))


def main():
    n = int(input())
    process([input() for i in range(n)])


if __name__ == "__main__":
    main()

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

import collections


def process(commands):
    queue = collections.deque()
    for c in commands:
        if "insert" in c:
            queue.appendleft(int(c[7:]))
        elif "deleteFirst" in c:
            try:
                _ = queue.popleft()
            except IndexError as e:
                pass
        elif "deleteLast" in c:
            try:
                _ = queue.pop()
            except IndexError as e:
                pass
        elif "delete" in c:
            try:
                queue.remove(int(c[7:]))
            except ValueError as e:
                pass
    print(" ".join(list(map(str, queue))))


def main():
    n = int(input())
    process([input() for i in range(n)])


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def process(commands):
    d = []
    for c in commands:
        cpair = c.split()
        if cpair[0] == "insert":
            d.append(cpair[1])
        elif cpair[0] == "find":
            r = "yes" if cpair[1] in d else "no"
            print(r)


def main():
    n = int(input())
    commands = [input() for i in range(n)]
    process(commands)


if __name__ == "__main__":
    main()

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


def process(commands):
    d = set()
    for c in commands:
        cpair = c.split()
        if cpair[0] == "insert":
            d.add(cpair[1])
        elif cpair[0] == "find":
            r = "yes" if cpair[1] in d else "no"
            print(r)


def main():
    n = int(input())
    commands = [input() for i in range(n)]
    process(commands)


if __name__ == "__main__":
    main()

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

import bisect


def isincluded(array, value):
    i = bisect.bisect_left(array, value)
    if i != len(array) and array[i] == value:
        return True
    else:
        return False


def process(commands):
    d = []
    for c in commands:
        cpair = c.split()
        if cpair[0] == "insert":
            bisect.insort_left(d, cpair[1])
        elif cpair[0] == "find":
            r = "yes" if isincluded(d, cpair[1]) else "no"
            print(r)


def main():
    n = int(input())
    commands = [input() for i in range(n)]
    process(commands)


if __name__ == "__main__":
    main()

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


def process(commands):
    d = set()
    for c in commands:
        cpair = c.split()
        if cpair[0] == "insert":
            d.add(cpair[1])
        elif cpair[0] == "find":
            r = "yes" if cpair[1] in d else "no"
            print(r)


def main():
    n = int(input())
    commands = [input() for i in range(n)]
    process(commands)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
 for i in range(1,10):
    print(i,"x",i,"=",i*i,sep="")

Fixed submission:
from itertools import product

for i in product(list(range(1,10)),list(range(1,10))):
    print(i[0],"x",i[1],"=",i[0]*i[1],sep="")

Buggy python submission (verdict: Runtime Error):
 for i in range(1,10):
    print(i,"x",i,"=",i*i,sep="")

Fixed submission:
from itertools import product

for i in product(list(range(1,10)),list(range(1,10))):
    print(i[0],"x",i[1],"=",i[0]*i[1],sep="")

Buggy python submission (verdict: Runtime Error):
 for i in range(1,10):
    print(i,"x",i,"=",i*i,sep="")

Fixed submission:
from itertools import product

for i in product(list(range(1,10)),list(range(1,10))):
    print(i[0],"x",i[1],"=",i[0]*i[1],sep="")
Buggy python submission (verdict: Runtime Error):
from itertools import product

value, variety = map(int, input().split())
coins = list(map(int, input().split()))
dp = [float("inf") for _ in range(value + 1)]
dp[0] = 0
for (c,j) in product(coins,list(range(value + 1))):
    dp[j] = min(dp[j], dp[j - c] + 1)
print(dp[value])

Fixed submission:
from itertools import product

value, variety = map(int, input().split())
coins = list(map(int, input().split()))
dp = [float("inf") for _ in range(value + 1)]
dp[0] = 0
for (c,j) in product(coins,list(range(value + 1))):
    if c <= j:
        dp[j] = min(dp[j], dp[j - c] + 1)
    else:
        dp[j] = dp[j]
print(dp[value])

Buggy python submission (verdict: Runtime Error):
from itertools import product

value, variety = map(int, input().split())
coins = list(map(int, input().split()))
dp = [float("inf") for _ in range(value + 1)]
dp[0] = 0
for (c,j) in product(coins,list(range(value + 1))):
    dp[j] = min(dp[j], dp[j - c] + 1)
print(dp[value])

Fixed submission:
from itertools import product

value, variety = map(int, input().split())
coins = list(map(int, input().split()))
dp = [float("inf") for _ in range(value + 1)]
dp[0] = 0
for (c,j) in product(coins,list(range(value + 1))):
    if c <= j:
        dp[j] = min(dp[j], dp[j - c] + 1)
    else:
        dp[j] = dp[j]
print(dp[value])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
numbers = []
for i in range(N):
    numbers.append(int(input()))

lis = [-float("inf"),numbers[0]]
for last in numbers[1:]:
    for i, (left, right) in enumerate(zip(lis, lis[1:])):
        if left < last and last < right:
            lis = lis[:i+1] + [last] + lis[i+2:]
            break
    if lis[-1] < last:
        lis.append(last)

print(len(lis)-1)

Fixed submission:
import bisect

N = int(input())
numbers = []
for i in range(N):
    numbers.append(int(input()))

lis = [numbers[0]]
for last in numbers[1:]:
    if lis[-1] < last:
        lis.append(last)
    else:
        pos = bisect.bisect_left(lis, last)
        lis[pos] = last

print(len(lis))

Buggy python submission (verdict: Time Limit Exceeded):
import bisect

N = int(input())
numbers = []
for i in range(N):
    numbers.append(int(input()))

lis = [numbers[0]]
for last in numbers[1:]:
    pos = bisect.bisect_left(lis, last)
    if len(lis) < pos:
        lis.append(last)
    else:
        lis = lis[:pos] + [last] + lis[pos+1:]

print(len(lis))

Fixed submission:
import bisect

N = int(input())
numbers = []
for i in range(N):
    numbers.append(int(input()))

lis = [numbers[0]]
for last in numbers[1:]:
    if lis[-1] < last:
        lis.append(last)
    else:
        pos = bisect.bisect_left(lis, last)
        lis[pos] = last

print(len(lis))
Buggy python submission (verdict: Runtime Error):
x = input()
print(x*x*x)

Fixed submission:
x = input()
print(x*x*x)
Buggy python submission (verdict: Runtime Error):
import sys

n, m = map(int, raw_input().split())
cnt = [0 for _ in range(n)]
cntS = [[0 for _ in range(n)] for _ in range(m)]

for i in range(n):
  k = input()-1
  cnt[k] += 1
  cntS[k][i] = 1

for k in range(m):
  for i in range(n-1):
    cntS[k][i+1] += cntS[k][i]

dp = [sys.maxint/4 for _ in range(1<<m)]
dp[0] = 0

for S in range((1<<m)-1):
  for k in range(m):
    if not (S>>k&1):
      idx = 0
      for i in range(m):
        if S>>i&1:
          idx += cnt[i]

      if idx+cnt[k] <= n:
        dp[S|1<<k] = min(dp[S|1<<k], dp[S] + cnt[k]-(cntS[k][idx+cnt[k]-1]-(cntS[k][idx-1] if idx-1>=0 else 0)))
     
print dp[(1<<m)-1]

Fixed submission:
import sys

n, m = map(int, raw_input().split())
cnt = [0 for _ in range(n)]
cntS = [[0 for _ in range(n)] for _ in range(m)]

for i in range(n):
  k = input()-1
  cnt[k] += 1
  cntS[k][i] = 1

for k in range(m):
  for i in range(n-1):
    cntS[k][i+1] += cntS[k][i]

dp = [sys.maxint/4 for _ in range(1<<m)]
dp[0] = 0

idx = [0 for _ in range(1<<m)]
for S in range((1<<m)-1):
  for i in range(m):
    if S>>i&1:
      idx[S] += cnt[i]

for S in range((1<<m)-1):
  for k in range(m):
    if not (S>>k&1):
      if idx[S]+cnt[k] <= n:
        dp[S|1<<k] = min(dp[S|1<<k], dp[S] + cnt[k]-(cntS[k][idx[S]+cnt[k]-1]-(cntS[k][idx[S]-1] if idx[S]-1>=0 else 0)))
     
print dp[(1<<m)-1]
Buggy python submission (verdict: Runtime Error):
second = input()

second = (int)second
h = second // 3600
m = (second % 3600) // 60
s = (second % 3600) % 60
print("{0:02}:{1:02}:{2:02}".format(h,m,s))


Fixed submission:
second = input()

second = int(second)
h = second // 3600
m = (second % 3600) // 60
s = (second % 3600) % 60
print("{0}:{1}:{2}".format(h,m,s))
Buggy python submission (verdict: Time Limit Exceeded):
abc_s = input()
abc_a = abc_s.split(" ")
abc = [int(x) for x in abc_a]

sorted = False

while sorted == False:
  sorted == True
  if abc[0] > abc[1]:
    sorted == False
    tmp = abc[0]
    abc[0] = abc[1]
    abc[1] = tmp
  if abc[1] > abc[2]:
    sorted == False
    tmp = abc[1]
    abc[1] = abc[2]
    abc[2] = tmp

print("{0} {1} {2}".format(abc))


Fixed submission:
abc_s = input()
abc_a = abc_s.split(" ")
abc = [int(x) for x in abc_a]
 
sorted = False
 
while sorted == False:
  sorted = True
  if abc[0] > abc[1]:
    sorted = False
    tmp = abc[0]
    abc[0] = abc[1]
    abc[1] = tmp
  if abc[1] > abc[2]:
    sorted = False
    tmp = abc[1]
    abc[1] = abc[2]
    abc[2] = tmp
 
print("{0[0]} {0[1]} {0[2]}".format(abc))

Buggy python submission (verdict: Runtime Error):
abc_s = input()
abc_a = abc_s.split(" ")
abc = [int(x) for x in abc_a]

sorted = False

while sorted == False:
  sorted = True
  if abc[0] > abc[1]:
    sorted == False
    tmp = abc[0]
    abc[0] = abc[1]
    abc[1] = tmp
  if abc[1] > abc[2]:
    sorted == False
    tmp = abc[1]
    abc[1] = abc[2]
    abc[2] = tmp

print("{0} {1} {2}".format(abc))


Fixed submission:
abc_s = input()
abc_a = abc_s.split(" ")
abc = [int(x) for x in abc_a]
 
sorted = False
 
while sorted == False:
  sorted = True
  if abc[0] > abc[1]:
    sorted = False
    tmp = abc[0]
    abc[0] = abc[1]
    abc[1] = tmp
  if abc[1] > abc[2]:
    sorted = False
    tmp = abc[1]
    abc[1] = abc[2]
    abc[2] = tmp
 
print("{0[0]} {0[1]} {0[2]}".format(abc))

Buggy python submission (verdict: Runtime Error):
abc_s = input()
abc_a = abc_s.split(" ")
abc = [int(x) for x in abc_a]

sorted = False

while sorted == False:
  sorted = True
  if abc[0] > abc[1]:
    sorted == False
    tmp = abc[0]
    abc[0] = abc[1]
    abc[1] = tmp
  if abc[1] > abc[2]:
    sorted == False
    tmp = abc[1]
    abc[1] = abc[2]
    abc[2] = tmp

print("{array[0]} {array[1]} {array[2]}".format(abc))


Fixed submission:
abc_s = input()
abc_a = abc_s.split(" ")
abc = [int(x) for x in abc_a]
 
sorted = False
 
while sorted == False:
  sorted = True
  if abc[0] > abc[1]:
    sorted = False
    tmp = abc[0]
    abc[0] = abc[1]
    abc[1] = tmp
  if abc[1] > abc[2]:
    sorted = False
    tmp = abc[1]
    abc[1] = abc[2]
    abc[2] = tmp
 
print("{0[0]} {0[1]} {0[2]}".format(abc))
Buggy python submission (verdict: Runtime Error):
a = int(iput())
print(' ')
b = int(input())

print(a * b + ' ' + a * 2 + b * 2)



Fixed submission:
a,b = input().split(' ')
x = int(a)
y = int(b)
print(str(x * y) + ' ' + str((x + y) * 2))
Buggy python submission (verdict: Runtime Error):
x = int(input())
score_A = 0
score_B = 0
ans = []
while x:
    for i in range(x):
        y = [int(i) for  i in input().split()]
        if y[0] > y[1]:
            score_A += sum(y)
        elif y[0] < y[1]:
            score_B += sum(y)
        else:
            score_A += y[0]
            score_B += y[1]
    ans.append([score_A,score_B])
    score_A = 0 ; score_B = 0
    x = int(input()
for i in ans:
    print(*i)


Fixed submission:
x = int(input())
score_A = 0
score_B = 0
ans = []
while x:
    for i in range(x):
        y = [int(i) for  i in input().split()]
        if y[0] > y[1]:
            score_A += sum(y)
        elif y[0] < y[1]:
            score_B += sum(y)
        else:
            score_A += y[0]
            score_B += y[1]
    ans.append([score_A,score_B])
    score_A = 0 ; score_B = 0
    x = int(input())
for i in ans:
    print(*i)
Buggy python submission (verdict: Runtime Error):

n = input()
for i in range(n):
    h,m = map(int, raw_input().split(":"))
    sangle = 1.0 * 360 * (h * 60 + m) / 720
    langle = 1.0 * 360 * m / 60
    angle = abs(sangle - langle)
    if angle > 180:
        angle = 360 - d
    if (0 <= angle < 30):
        print "alert"
    elif (90 <= angle <= 180):
        print "safe"
    else:
        print "warning"

Fixed submission:

n = input()
for i in range(n):
    h,m = map(int, raw_input().split(":"))
    sangle = 1.0 * 360 * (h * 60 + m) / 720
    langle = 1.0 * 360 * m / 60
    angle = abs(sangle - langle)
    if angle > 180:
        angle = 360 - angle
    if (0 <= angle < 30):
        print "alert"
    elif (90 <= angle <= 180):
        print "safe"
    else:
        print "warning"
Buggy python submission (verdict: Runtime Error):
x=raw_input();
y=raw_input();
z=raw_input();
l=[];
l.append(x);
l.append(y);
l.append(z);
l.sort();
print l[0],l[1],l[2]

Fixed submission:
x=raw_input();
l=x.split();
l.sort();
for x in l:
    print x,

Buggy python submission (verdict: Runtime Error):
x=raw_input();
y=raw_input();
z=raw_input();
l=[];
l.append(x);
l.append(y);
l.append(z);
l.sort();
for x in l:
    print x,

Fixed submission:
x=raw_input();
l=x.split();
l.sort();
for x in l:
    print x,
Buggy python submission (verdict: Runtime Error):
i = 0
while True:
    foo =raw_input();
    i +=1
    if foo =="0":
        break
    print"Case %s: %s" %(i,foo)

Fixed submission:
for val in range(1000):
    print("Hello World")
Buggy python submission (verdict: Runtime Error):
from numpy.core.fromnumeric import sort
n =int(raw_input())
tango =[]
for i in range(n):
    str =raw_input()
    tango.append(str)

tango.sort()
print tango[0]

Fixed submission:
n =int(raw_input())
tango =[]
for i in range(n):
    str =raw_input()
    tango.append(str)

tango.sort()
print tango[0]