Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a_score, b_score = 0, 0
while(True):
  input_list = map(int, raw_input(), split())
  if len(input_list) == 1 and input_list[0] == 0:
    break
  elif len(input_list) == 1:
    print a_score, b_score
    a_score, b_score = 0, 0
  elif len(input_list) == 2:
    a, b = input_list
    if a > b:
      a_score += a + b
    elif b > a:
      b_score += a + b
    else:
      a_score += a
      b_score += b

Fixed submission:

def solve():
  while(1):
    n = int(raw_input())
    if n == 0:
      break
    score_a, score_b = 0, 0
    while(n > 0):
      a, b = map(int, raw_input().split())
      if a > b:
        score_a += a + b
      elif b > a:
        score_b += a + b
      else:
        score_a += a
        score_b += b
      n -= 1
    print score_a, score_b

if __name__ == '__main__':
  solve()

Buggy python submission (verdict: Runtime Error):
a_score, b_score = 0, 0
while(True):
  input_list = map(int, raw_input().split())
  if len(input_list) == 1 and input_list == 0:
    break
  elif len(input_list) == 1 and input_list != 0:
    if a_score != 0 or b_score != 0:
      print a_score, b_score
    a_score, b_score = 0, 0
  elif len(input_list) == 2:
    a, b = input_list
    if a > b:
      a_score += a + b
    elif b > a:
      b_score += a + b
    else:
      a_score += a
      b_score += b

Fixed submission:

def solve():
  while(1):
    n = int(raw_input())
    if n == 0:
      break
    score_a, score_b = 0, 0
    while(n > 0):
      a, b = map(int, raw_input().split())
      if a > b:
        score_a += a + b
      elif b > a:
        score_b += a + b
      else:
        score_a += a
        score_b += b
      n -= 1
    print score_a, score_b

if __name__ == '__main__':
  solve()
Buggy python submission (verdict: Runtime Error):
def hoge(numbers):
  count = 1
  answer = []
  prev_number = number[0]
  for i, number in enumerate(numbers):
      if number == numbers[i-1] or count == 0:
        count += 1
      elif number != numbers[i-1]:
        asnwer.append(count)
        answer.append(number)
        count = 0
  return answer

while 1:
  N = input()
  number_list = hoge(map(int, raw_input().split()))
  for n in range(N - 1):
    number_list = hoge(number_list)
  for number in number_list:
    print number, 

Fixed submission:
def f(a,n):
    for j in range(n):
        aa = ""
        s = a[0]
        c = 1
        for i in range(1,len(a)):
            if a[i] == s:
                c += 1
            else:
                aa += str(c) + s
                s = a[i]
                c = 1
        a = aa + str(c) + s
    return a
     
while 1:
    n = input()
    if n == 0: break
    a = raw_input()
    print f(a,n)
Buggy python submission (verdict: Runtime Error):
import math

r = raw_input()

print '%f %f%'%(float(r)*r*math.pi, float(r)*float(2)*math.pi)

Fixed submission:
import math

r = raw_input()

print '%f %f'%(float(r)*float(r)*math.pi, float(r)*2*math.pi)

Buggy python submission (verdict: Runtime Error):
import math

r = raw_input()

print '%f %f%'%(float(r)*float(r)*math.pi, float(r)*2*math.pi)

Fixed submission:
import math

r = raw_input()

print '%f %f'%(float(r)*float(r)*math.pi, float(r)*2*math.pi)
Buggy python submission (verdict: Runtime Error):
def main(n):
    print int(raw_input())**3

main(n)

Fixed submission:
def main(n):
    print int(n)**3

main(raw_input())
Buggy python submission (verdict: Runtime Error):
def get_area(a, b):
  return a*b

def get_length(a, b):
  return a*2+b*2

def main(l):
  a = l[0]
  b = l[1]
  area = get_area(a, b)
  length = get_length(a, b)
  print str(a)+' '+str(b)


l = raw_input().split(' ')
main(l)

Fixed submission:
def get_area(a, b):
  return a*b

def get_length(a, b):
  return a*2+b*2

def main(l):
  a = int(l[0])
  b = int(l[1])
  area = get_area(a, b)
  length = get_length(a, b)
  print str(area)+' '+str(length)


l = raw_input().split(' ')
main(l)
Buggy python submission (verdict: Runtime Error):
while True:
  H, W = map(int, raw_input().spslit())
  if H = 0 and 'W' = 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + '.'*(W-2) + '#'
  print '#' * W

Fixed submission:
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

Buggy python submission (verdict: Runtime Error):
while True:
  H, W = map(int, raw_input().spslit())
  if H = 0 and 'W' = 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + '.'*(W-2) + '#'
  print '#' * W
  print 

Fixed submission:
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

Buggy python submission (verdict: Runtime Error):
while True:
  H, W = map(int, raw_input().spslit())
  if H = 0 and 'W' = 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + '.'*(W-2) + '#'
  print '#' * W
  print ''

Fixed submission:
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

Buggy python submission (verdict: Runtime Error):
while True:
  H, W = map(int, raw_input().split())
  if H = 0 and 'W' = 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + '.'*(W-2) + '#'
  print '#' * W
  print ''

Fixed submission:
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

Buggy python submission (verdict: Runtime Error):
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and 'W' == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + '.'*(W-2) + '#'
  print '#' * W
  print ''

Fixed submission:
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

Buggy python submission (verdict: Runtime Error):
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and 'W' == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

Fixed submission:
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''
Buggy python submission (verdict: Runtime Error):
i = 1
while True:
  pritn 'Case {number}: {input}'.format(number=i, input=raw_input())
  i += 1

Fixed submission:
i = 1
while True:
  x = raw_input()
  if x == '0':
    break
  print 'Case {0}: {1}'.format(i, x)
  i += 1

Buggy python submission (verdict: Runtime Error):
i = 1
while True:
  if raw_input() == 0:
    break
  pritn 'Case {number}: {input}'.format(number=i, input=raw_input())
  i += 1

Fixed submission:
i = 1
while True:
  x = raw_input()
  if x == '0':
    break
  print 'Case {0}: {1}'.format(i, x)
  i += 1

Buggy python submission (verdict: Runtime Error):
i = 1
while True:
  if raw_input() == '0':
    break
  pritn 'Case {number}: {input}'.format(number=i, input=raw_input())
  i += 1

Fixed submission:
i = 1
while True:
  x = raw_input()
  if x == '0':
    break
  print 'Case {0}: {1}'.format(i, x)
  i += 1
Buggy python submission (verdict: Runtime Error):
while True:
  if raw_input() == '0 0':
    break
  x, y = sorted(map(int, raw_input().split()))
  print str(x) + ' ' + str(y)

Fixed submission:
while True:
  x, y = sorted(map(int, raw_input().split()))
  if x ==0 and y == 0:
    break
  print '{0} {1}'.format(x, y)

Buggy python submission (verdict: Runtime Error):
while True:
  if raw_input() == '0 0':
    break
  x, y = sorted(map(int, raw_input().split()))
  print '{0} {1}'.format(x, y)

Fixed submission:
while True:
  x, y = sorted(map(int, raw_input().split()))
  if x ==0 and y == 0:
    break
  print '{0} {1}'.format(x, y)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())

print math.floor(a/b), a%b, a/b

Fixed submission:
a, b = map(int, raw_input().split())
print '%d %d %f'%(a/b, a%b, float(a)/b)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
print '{1} {2} {3}'.format(a/b, a%b, float(a)/b)

Fixed submission:
a, b = map(int, raw_input().split())
print '%d %d %f'%(a/b, a%b, float(a)/b)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
print '{1} {2} {3}'.format(a/b, a%b, float(a)/b)

Fixed submission:
a, b = map(int, raw_input().split())
print '%d %d %f'%(a/b, a%b, float(a)/b)
Buggy python submission (verdict: Runtime Error):
while True:
  a, op, b = raw_input.split()
  a = int(a)
  b = int(b)
  if op == '+':
    print a + b
  elif op == '-':
    print a - b
  elif op == '*':
    print a * b
  elif op == '/':
    print a / b
  elif op == '?':
    break

Fixed submission:
while True:
  a, op, b = raw_input().split()
  a = int(a)
  b = int(b)
  if op == '+':
    print a + b
  elif op == '-':
    print a - b
  elif op == '*':
    print a * b
  elif op == '/':
    print a / b
  elif op == '?':
    break
Buggy python submission (verdict: Runtime Error):
i = raw_input()
sequence = map(int, raw_input().split())

print reverse(sequence)

Fixed submission:
i = raw_input()
sequence = map(int, raw_input().split())

sequence.reverse()
for number in sequence:
  print number,
Buggy python submission (verdict: Runtime Error):
import sys

while True:
  H, W = map(int, raw_input().split())
  for h in range(0, H):
    for w in range(0, W):
      if h % 2 == 0:
        if w % 2 == 0:
          sys.stdout.write('#')
        else:
          sys.stdout.write('.')
      else:
        if w % 2 == 0:
          sys.stdout.write('.')
        else:
          sys.stdout.write('#')
    sys.stdout.write('\n')
  print ''

Fixed submission:
import sys

while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  for h in range(0, H):
    for w in range(0, W):
      if h % 2 == 0:
        if w % 2 == 0:
          sys.stdout.write('#')
        else:
          sys.stdout.write('.')
      else:
        if w % 2 == 0:
          sys.stdout.write('.')
        else:
          sys.stdout.write('#')
    sys.stdout.write('\n')
  print ''
Buggy python submission (verdict: Runtime Error):
while True:
  m, f, r = map(int, raw_input().split())
  if m == -1 and f == -1 and r == -1:
    break
  elif m == -1 or f == -1 or m + f < 30:
    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'

Fixed submission:
while True:
  m, f, r = map(int, raw_input().split())
  if m == -1 and f == -1 and r == -1:
    break
  if m == -1 or f == -1 or m + f < 30:
    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'

Buggy python submission (verdict: Runtime Error):
while True:
  m, f, r = map(int, raw_input().split())
  if m == -1 and f == -1 and r == -1:
    break
  if m == -1 or f == -1 or m + f < 30:
    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'

Fixed submission:
while True:
  m, f, r = map(int, raw_input().split())
  if m == -1 and f == -1 and r == -1:
    break
  if m == -1 or f == -1 or m + f < 30:
    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'
Buggy python submission (verdict: Runtime Error):
  strings = raw_input.split(',')
  new_strings = []
  for string in strings:
    if string.islower():
      new_strings.append(string.upper())
    else:
      new_strings.append(string.lower())
  for new_string in new_strings:
    print new_string + ',',

Fixed submission:
print raw_input().swapcase()

Buggy python submission (verdict: Runtime Error):
strings = raw_input.split(',')
new_strings = []
for string in strings:
  if string.islower():
    new_strings.append(string.upper())
  else:
    new_strings.append(string.lower())
for new_string in new_strings:
  print new_string + ',',

Fixed submission:
print raw_input().swapcase()

Buggy python submission (verdict: Runtime Error):
strings = raw_input.split(',')
new_strings = ""
for string in strings:
  if string.islower():
    new_strings.append(string.upper()+',')
  else:
    new_strings.append(string.lower())
print  new_strings

Fixed submission:
print raw_input().swapcase()

Buggy python submission (verdict: Runtime Error):
strings = raw_input.split(',')
new_strings = ""
for string in strings:
  if string.islower():
    new_strings.append(string.upper()+',')
  else:
    new_strings.append(string.lower()+',')
print  new_strings

Fixed submission:
print raw_input().swapcase()

Buggy python submission (verdict: Runtime Error):
strings = raw_input().split(',')
new_strings = ""
for string in strings:
  if string.islower():
    new_strings.append(string.upper()+',')
  else:
    new_strings.append(string.lower()+',')
print  new_strings

Fixed submission:
print raw_input().swapcase()

Buggy python submission (verdict: Runtime Error):
strings = list(raw_input())
new_strings = ""
for string in strings:
  if string.islower():
    new_strings.append(string.upper()+',')
  else:
    new_strings.append(string.lower()+',')
print  new_strings

Fixed submission:
print raw_input().swapcase()
Buggy python submission (verdict: Runtime Error):
count = 0
target = raw_input()

while True:
  sentence = raw_input()
  if raw_input == 'END_OF_TEXT':
    break
  words = sentence.split()
  for word in words:
    if word == target:
      count +=1

print count

Fixed submission:
count = 0
target = raw_input()

while True:
  sentence = raw_input()
  if sentence == 'END_OF_TEXT':
    break
  words = sentence.lower().split()
  for word in words:
    if word == target:
      count +=1

print count
Buggy python submission (verdict: Runtime Error):
def shuffle(strings, num):
  tmp = strings[0:num]
  new_strings = strings.replace(tmp, "") + tmp
  return new_string

strings = raw_input()
while(True):
  num = raw_input()
  if type(num) == str:
    print strings
    strings = num
    continue
  elif num == '-':
    break
  strings = shuffle(strings, num)

Fixed submission:
while True :
	s = raw_input()
	if s == '-' :
		break
	m = int(raw_input())
	for i in range(m) :
		h = int(raw_input())
		s = s[h:] + s[:h]
	print s

Buggy python submission (verdict: Runtime Error):
def shuffle(strings, num):
  tmp = strings[0:num]
  new_strings = strings.replace(tmp, "") + tmp
  return new_strings

strings = raw_input()
while(True):
  num = raw_input()
  if type(num) == str:
    print strings
    strings = num
    continue
  elif num == '-':
    break
  strings = shuffle(strings, num)

Fixed submission:
while True :
	s = raw_input()
	if s == '-' :
		break
	m = int(raw_input())
	for i in range(m) :
		h = int(raw_input())
		s = s[h:] + s[:h]
	print s
Buggy python submission (verdict: Runtime Error):
import math 


x1, y1, x2, y2 = map(int, raw_input().split())

print sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))

Fixed submission:
from math import sqrt, pow

x1, y1, x2, y2 = map(float, raw_input().split())

print sqrt(pow((x2-x1), 2)+pow((y2-y1), 2))

Buggy python submission (verdict: Runtime Error):
import math 


x1, y1, x2, y2 = map(float, raw_input().split())

print sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))

Fixed submission:
from math import sqrt, pow

x1, y1, x2, y2 = map(float, raw_input().split())

print sqrt(pow((x2-x1), 2)+pow((y2-y1), 2))

Buggy python submission (verdict: Runtime Error):
import math 


x1, y1, x2, y2 = map(float, raw_input().split())

print sqrt(pow((x2-x1), 2)+pow((y2-y1), 2))

Fixed submission:
from math import sqrt, pow

x1, y1, x2, y2 = map(float, raw_input().split())

print sqrt(pow((x2-x1), 2)+pow((y2-y1), 2))
Buggy python submission (verdict: Runtime Error):
n = int(input())

answer = sort(map(int, raw_input().split()))

print answer

Fixed submission:
n = input()

answers = sorted(map(int, raw_input().split()))

for answer in answers:
  print answer,

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

answer = sort(map(int, raw_input().split()))

print answer

Fixed submission:
n = input()

answers = sorted(map(int, raw_input().split()))

for answer in answers:
  print answer,

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

answers = map(int, raw_input().split()).sort()

for answer in answers:
  print answer,

Fixed submission:
n = input()

answers = sorted(map(int, raw_input().split()))

for answer in answers:
  print answer,
Buggy python submission (verdict: Runtime Error):
n = input()
set_n = set(raw_input().split())
q = input()
set_q = set(raw_input().split()
answer = (set_n & set_q)
print len(answer)

Fixed submission:
n = input()
set_n = set(raw_input().split())
q = input()
set_q = set(raw_input().split())
print len(set_n & set_q)
Buggy python submission (verdict: Runtime Error):
mountain, answer = [], []

while(True):
  operation = raw_input().split()
  if operation[0] == 'push':
    mountain.append(operation[1])
  elif operation[0] == 'pop':
    answer. append(mountain[-1])
    mountain.pop()
  elif operation == 'quit':
    break

for a in answer:
  print a 

Fixed submission:
mountain, answer = [], []

while(True):
  operation = raw_input().split()
  if operation[0] == 'push':
    mountain.append(operation[1])
  elif operation[0] == 'pop':
    answer. append(mountain[-1])
    mountain.pop()
  elif operation[0] == 'quit':
    break

for a in answer:
  print a
Buggy python submission (verdict: Runtime Error):
__Author__ = 'Anomino'
# coding:UTF-8


def AskUser(number) : 
    player_A, player_B = [], []
    for value in range(0, number) : 
        answer = raw_input()
        answer = answer.split( )
        player_A.append(int(answer[0]))
        player_B.append(int(answer[1]))

    return player_A, player_B
    
def CalcScore(player_A, player_B) : 
    score_A, score_B = 0, 0

    for value in range(0, len(player_A)) : 
        if player_A[value] < player_B[value] : 
            score_B = score_B + player_A[value] + player_B[value]
        elif player_A[value] > player_B[value] : 
            score_A = score_A + player_A[value] + player_B[value]
        else : 
            score_A = score_A + player_A[value]
            score_B = score_B + player_B[value]

    return score_A, score_B

if __name__ == '__main__' : 
    total_A, total_B = [], []

    while (number = int(raw_input())) != 0 :
        player_A, player_B = AskUser(number)
        score_A, score_B = CalcScore(player_A, player_B)
        total_A.append(score_A)
        total_B.append(score_B)

    for value in range(0, len(total_A)) : 
        print total_A[value], total_B[value]

Fixed submission:
__Author__ = 'Anomino'
# coding:UTF-8


def AskUser(number) : 
    player_A, player_B = [], []
    for value in range(0, number) : 
        answer = raw_input()
        answer = answer.split( )
        player_A.append(int(answer[0]))
        player_B.append(int(answer[1]))

    return player_A, player_B
    
def CalcScore(player_A, player_B) : 
    score_A, score_B = 0, 0

    for value in range(0, len(player_A)) : 
        if player_A[value] < player_B[value] : 
            score_B = score_B + player_A[value] + player_B[value]
        elif player_A[value] > player_B[value] : 
            score_A = score_A + player_A[value] + player_B[value]
        else : 
            score_A = score_A + player_A[value]
            score_B = score_B + player_B[value]

    return score_A, score_B

if __name__ == '__main__' : 
    total_A, total_B = [], []
    number = int(raw_input())

    while number != 0 :
        player_A, player_B = AskUser(number)
        score_A, score_B = CalcScore(player_A, player_B)
        total_A.append(score_A)
        total_B.append(score_B)
        number = int(raw_input())

    for value in range(0, len(total_A)) : 
        print total_A[value], total_B[value]

Buggy python submission (verdict: Runtime Error):
n = int(input())
while n != 0:
 A = 0
 B = 0
 for i in range(n):
  a, b = map(int, input().split())
  if a > b:
   A += a + b
  elif a < b:
   B += a + b
  else:
   A += a
   B += b
  print("{0} {1}".format(A, B))
  n = int(input())

Fixed submission:
n = int(input())
while n != 0:
 A = 0
 B = 0
 for i in range(n):
  a, b = map(int, input().split())
  if a > b:
   A += (a + b)
  elif a < b:
   B += (a + b)
  else:
   A += a
   B += b
 print("{0} {1}".format(A, B))
 n = int(input())
Buggy python submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(float, input().split())
import math
print("{0.8}".format(math.sqrt(x1*x2 + y1*y2)))

Fixed submission:
x1, y1, x2, y2 = map(float, input().split())
import math
ans = math.sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2))
print("{0:.8f}".format(ans))

Buggy python submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(float, input().split())
import math
print("{0???.8}".format(math.sqrt(x1*x2 + y1*y2)))

Fixed submission:
x1, y1, x2, y2 = map(float, input().split())
import math
ans = math.sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2))
print("{0:.8f}".format(ans))

Buggy python submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(float, input().split())
import math
print("{0???.8???}".format(math.sqrt(x1*x2 + y1*y2)))

Fixed submission:
x1, y1, x2, y2 = map(float, input().split())
import math
ans = math.sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2))
print("{0:.8f}".format(ans))
Buggy python submission (verdict: Runtime Error):
import math
a, b, C = map(float, input().split()
C_rad = math.radians(C)
c = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(C_rad))
S = a * b * math.sin(C_rad) / 2
L = a + b + c
h = b * math.sin(C_rad)
print("{0:.6} {1:.6} {2:.6}".format(S, L, 

Fixed submission:
import math
a, b, C = map(float, input().split())
C_rad = math.radians(C)
c = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(C_rad))
S = a * b * math.sin(C_rad) / 2
L = a + b + c
h = b * math.sin(C_rad)
print("{0} {1} {2}".format(S, L, h))

Buggy python submission (verdict: Runtime Error):
import math
a, b, C = map(float, input().split()
C_rad = math.radians(C)
c = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(C_rad))
S = a * b * math.sin(C_rad) / 2
L = a + b + c
h = b * math.sin(C_rad)
print("{0:.6} {1:.6} {2:.6}".format(S, L, h))

Fixed submission:
import math
a, b, C = map(float, input().split())
C_rad = math.radians(C)
c = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(C_rad))
S = a * b * math.sin(C_rad) / 2
L = a + b + c
h = b * math.sin(C_rad)
print("{0} {1} {2}".format(S, L, h))
Buggy python submission (verdict: Runtime Error):
import math
while n != 0
 n = int(input())
 if n == 0:
  break
 else:
  s = list(map(int, input().split()))
  m = 0
  for i in range(n):
   m += s[i]
  si2 = 0
  for i in range(n):
   si2 += (s[i] - m)**2
  print(math.sqrt(si2))

 

Fixed submission:
import math
n = 1
while n != 0:
 n = int(input())
 if n == 0:
  break
 else:
  s = list(map(int, input().split()))
  m = 0
  for i in range(n):
   m += s[i]
  m /= n
  si2 = 0
  for i in range(n):
   si2 += (s[i] - m)**2
  si2 /= n
  print(math.sqrt(si2))

Buggy python submission (verdict: Runtime Error):
import math
while n != 0:
 n = int(input())
 if n == 0:
  break
 else:
  s = list(map(int, input().split()))
  m = 0
  for i in range(n):
   m += s[i]
  si2 = 0
  for i in range(n):
   si2 += (s[i] - m)**2
  print(math.sqrt(si2))

 

Fixed submission:
import math
n = 1
while n != 0:
 n = int(input())
 if n == 0:
  break
 else:
  s = list(map(int, input().split()))
  m = 0
  for i in range(n):
   m += s[i]
  m /= n
  si2 = 0
  for i in range(n):
   si2 += (s[i] - m)**2
  si2 /= n
  print(math.sqrt(si2))