Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a=list(raw_input().split(" ")))
b=map(int,a)
b.sort()
print " ".join(map(str,b))

Fixed submission:
a=list(raw_input().split(" "))
b=map(int,a)
b.sort()
print " ".join(map(str,b))

Buggy python submission (verdict: Runtime Error):
a=list(raw_input().split(" ")))
b=map(int,a)
b.sort()
print " ".join(map(str,b))

Fixed submission:
a=list(raw_input().split(" "))
b=map(int,a)
b.sort()
print " ".join(map(str,b))
Buggy python submission (verdict: Runtime Error):
while True :                                                                                        
  4     a,b = map(int,raw_input().split())                                                              
  5                                                                                                     
  6     if a ==0 and b==0 :                                                                             
  7         break                                                                                       
  8     else:                                                                                           
  9         if a > b:                                                                                   
 10             print b,a                                                                               
 11         else:                                                                                       
 12             print a,b

Fixed submission:
while True :
    a,b = map(int,raw_input().split())

    if a ==0 and b==0 :
        break
    else:
        if a > b:
            print b,a
        else:
            print a,b
Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())

d=a/b
r=a%b
f=float(a)/float(b)

print "%d %d %f" % d,r,f

Fixed submission:
from decimal import Decimal
a,b = map(int,raw_input().split())

d=a/b
r=a%b

print "%d %d %f" %(d,r,float(a)/b)
Buggy python submission (verdict: Runtime Error):
import numpy as np

r = input()

a = r**2*np.pi
b = r*2*np.pi

print a,b

Fixed submission:
import math 

r = input()

a = r**2*math.pi
b = r*2*math.pi

print ("%f %f" %(a,b))

Buggy python submission (verdict: Runtime Error):
import numpy as np

r = input()

a = r**2*np.pi
b = r*2*np.pi

print a,b

Fixed submission:
import math 

r = input()

a = r**2*math.pi
b = r*2*math.pi

print ("%f %f" %(a,b))
Buggy python submission (verdict: Runtime Error):
wihle True:
    a, op, b = map(str, raw_input().split())

    if op in "+":
        print int(a)+int(b) 
    elif op in "-":
        print int(a)-int(b)
    elif op in "*":
        print int(a)*int(b)
    elif op in "/":
        print int(a)/int(b)
    else :
        break;

Fixed submission:
while True:
    a, op, b = map(str, raw_input().split())

    if op in "+":
        print int(a)+int(b) 
    elif op in "-":
        print int(a)-int(b)
    elif op in "*":
        print int(a)*int(b)
    elif op in "/":
        print int(a)/int(b)
    else :
        break;
Buggy python submission (verdict: Runtime Error):
student_info = []
while True:
    s = map(int,raw_input().split(" "))

    if s[0] is s[1] is s[2] is -1:
        break
    
    student_info.append(s)

score_info = []
for s in student_info:
    if s[0] == -1 or s[1] == -1:
        score_info.append("F")

    elif s[0]+s[1] >= 80:
        score_info.append("A")

    elif 65 <= s[0]+s[1] < 80:
        score_info.appned("B")

    elif 50 <= s[0]+s[1] < 65:
        score_info.append("C")

    elif 30<= s[0]+s[1] < 50:
        if s[2] >= 50:
            score_info.append("C")
        else:
            score_info.append("D")
    else:
        score_info.append("F")

for i in score_info:
    print i

Fixed submission:
student_info = []
while True:
    s = map(int,raw_input().split(" "))

    if s[0] is s[1] is s[2] is -1:
        break
    
    student_info.append(s)

score_info = []
for s in student_info:
    if s[0] == -1 or s[1] == -1:
        score_info.append("F")

    elif s[0]+s[1] >= 80:
        score_info.append("A")

    elif 65 <= s[0]+s[1] < 80:
        score_info.append("B")

    elif 50 <= s[0]+s[1] < 65:
        score_info.append("C")

    elif 30<= s[0]+s[1] < 50:
        if s[2] >= 50:
            score_info.append("C")
        else:
            score_info.append("D")
    else:
        score_info.append("F")

for i in score_info:
    print i
Buggy python submission (verdict: Runtime Error):
while True:
    num = input()

    print = sum(map(int,list(str(num))))
    if num == 0:
        break

Fixed submission:
num_list=[]
while True:
    num = input()
    if num == 0:
        break
    num_list.append(num)

for num in num_list:
    print sum(map(int,list(str(num))))
Buggy python submission (verdict: Runtime Error):
def find_word(sent, word):
    w = word    
    if sent.find(w) > -1:
        return w,y
    elif len(w) == 0:
        return w,"No"
    else:
        return find_word(sent,w[:-1])


sent = raw_input()
word = raw_input()
s = ""
s,y = find_word(sent,word)

b = word.replace(s,"")

a,y= find_word(sent,b)
print y

Fixed submission:
s = raw_input()
p = raw_input()

s += s

if p in s:
    print "Yes"
else:
    print "No"

Buggy python submission (verdict: Runtime Error):
def find_word(sent, word,s):
    w = word    
    if len(w) > 0 :
        if sent.find(w) >= 0:
            return s
        else:
            s+=1
            return find_word(sent,w[:-1],s)
    else :
        return -1

sent = raw_input()
word = raw_input()

s = find_word(sent,word,s)
if s == -1:
    print "No"
else:
    s = word[len(word)-s:len(word)]

    if sent.find(s) >=0:
        print "Yes"
    else:
        print "No"

Fixed submission:
s = raw_input()
p = raw_input()

s += s

if p in s:
    print "Yes"
else:
    print "No"
Buggy python submission (verdict: Runtime Error):

x1, y1, x2, y2 = (int(i) for i in input().split())
x_range = x2 - x1
y_range = y2 - y1

distance = pow(pow(x_range, 2) + pow(y_range, 2), 1/2)

print(distance)

Fixed submission:

x1, y1, x2, y2 = (float(i) for i in input().split())
x_range = x2 - x1
y_range = y2 - y1

distance = pow(pow(x_range, 2) + pow(y_range, 2), 1/2)

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

x, y, X, Y = [int(i) for i in input().split()]
print(math.sqrt((x-X)**2 + abs(y-Y)**2))

Fixed submission:
import math

x, y, X, Y = [float(i) for i in input().split()]
print(math.sqrt((x-X)**2 + (y-Y)**2))

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

x, y, X, Y = [int(i) for i in input().split()]
print(math.sqrt((x-X)**2 + abs(y-Y)**2),end='')

Fixed submission:
import math

x, y, X, Y = [float(i) for i in input().split()]
print(math.sqrt((x-X)**2 + (y-Y)**2))
Buggy python submission (verdict: Runtime Error):
print(x**3)

Fixed submission:
x = int(input())
print(x**3)
Buggy python submission (verdict: Runtime Error):
ab = input().split()
print(ab[0]*ab[1])

Fixed submission:
a, b = [int(i) for i in input().split()]
print(a*b, (a+b)*2)
Buggy python submission (verdict: Runtime Error):
x = int(input())
a = x//3600
b = x%3600//60
c = x%3600%60
print(a+':'+b+':'+c)

Fixed submission:
x = int(input())
print(x//3600,':',(x%3600)//60,':',(x%3600)%60,sep='')
Buggy python submission (verdict: Runtime Error):
x = sorted([int(i) for i in input().split()])
print("{0} {1} {2}".x)

Fixed submission:
x = sorted([int(i) for i in input().split()])
print("{0} {1} {2}".format(x[0],x[1],x[2]))

Buggy python submission (verdict: Runtime Error):
x = sorted([int(i) for i in input().split()])
print("{0} {1} {2}".format(x))

Fixed submission:
x = sorted([int(i) for i in input().split()])
print("{0} {1} {2}".format(x[0],x[1],x[2]))
Buggy python submission (verdict: Runtime Error):
X, Y, x, y, r =[int(i) for i in input().split()]
if (0 <= (y-r) and (y+r) <= Y) and (0 <= (x-r) and (x+r) <= X)
    print("Yes")
else:
    print("No")

Fixed submission:
X, Y, x, y, r =[int(i) for i in input().split()]
if (0 <= (y-r) and (y+r) <= Y) and (0 <= (x-r) and (x+r) <= X):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split() if i > 0: else: break]
for i in range(0,len(a)):
    print('Case ', i+1, ': ', a[i], sep='')

Fixed submission:
a =[]
x = 1
while x > 0:
    x = int(input())
    a.append(x)
for i in range(0,len(a)-1):
    print('Case ',i+1,': ',a[i],sep='')

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split() if i > 0 else break]
for i in range(0,len(a)):
    print('Case ', i+1, ': ', a[i], sep='')

Fixed submission:
a =[]
x = 1
while x > 0:
    x = int(input())
    a.append(x)
for i in range(0,len(a)-1):
    print('Case ',i+1,': ',a[i],sep='')

Buggy python submission (verdict: Runtime Error):
a = [(int(i) for i in input().split()) if i > 0 else break]
for i in range(0,len(a)):
    print('Case ', i+1, ': ', a[i], sep='')

Fixed submission:
a =[]
x = 1
while x > 0:
    x = int(input())
    a.append(x)
for i in range(0,len(a)-1):
    print('Case ',i+1,': ',a[i],sep='')
Buggy python submission (verdict: Runtime Error):
while True:
    x, y = [int(i) for i in input().split()]
    if x > y:
        print(y ,x)
    else:
        print(x,y)
     
        

    
    

Fixed submission:
while True:
    x, y = [int(i) for i in input().split()]
    if x > y:
        print(y ,x)
    elif x ==0 and y == 0:
        break
    else:
        print(x,y)
Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]
bet = c - a
nums = 0
for i in range(1,b+1)
    if b%i ==0 and bet%i ==0:
        nums = nums + 1
    else:
        pass
   
print(nums)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a, b + 1):
    if c%i == 0:
        nums = nums + 1
    else:
        pass
print(nums)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a,c+1)
    if b%i ==0 and bet%i ==0:
        nums = nums + 1
    else:
        pass
   
print(nums)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a, b + 1):
    if c%i == 0:
        nums = nums + 1
    else:
        pass
print(nums)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a,c+1)
    if b%i ==0 and c%i ==0:
        nums = nums + 1
    else:
        pass
   
print(nums)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a, b + 1):
    if c%i == 0:
        nums = nums + 1
    else:
        pass
print(nums)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a,c+1)
    if b%i ==0 :
        nums = nums + 1
    else:
        pass
   
print(nums)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a, b + 1):
    if c%i == 0:
        nums = nums + 1
    else:
        pass
print(nums)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a,c+1)
    if i%b ==0 :
        nums = nums + 1
    else:
        pass
   
print(nums)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a, b + 1):
    if c%i == 0:
        nums = nums + 1
    else:
        pass
print(nums)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a,c+1)
    if i%b ==0 or b%i==0 :
        nums = nums + 1
    else:
        pass
   
print(nums)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
nums = 0
for i in range(a, b + 1):
    if c%i == 0:
        nums = nums + 1
    else:
        pass
print(nums)
Buggy python submission (verdict: Runtime Error):
a, b = [int(i) for in input().split()]
print(a//b,int(a%b),float(a%b))

Fixed submission:
a, b = [float(i) for i in input().split()]
print("{0} {1} {2:10f}".format(int(a//b), int(a%b), a/b))
Buggy python submission (verdict: Runtime Error):
import math
r = float(input())
a = r * r* math.pi()
b = 2r *math.pi()
print( a, b)

Fixed submission:
import math
r = float(input())
a = r * r* math.pi
b = 2*r *math.pi
print( a, b)
Buggy python submission (verdict: Runtime Error):
H, W= [int(i) for i in input().split()]
for i in range(0,H):
    if W ==0 and H ==0:
        break
    elif i == 0:
        print('#'*W)
    elif i == (y-1):
        print('#'*W)
    elif H == 1:
        break
    else:
        print('#','.'*(W-2),'#',sep='')

Fixed submission:
while True:
    H, W = [int(i) for i in input().split()]
    if W == 0 and H == 0:
        break
    for i in range(0, H):
        if i == 0:
            print('#' * W)
        elif i == (H - 1):
            print('#' * W)
        elif H == 1:
            break
        else:
            print('#', '.' * (W - 2), '#', sep='')
    print()
Buggy python submission (verdict: Runtime Error):
x = int(input())
for i in range(1,x+1):
    if i%3 ==0:
        print(' ',i,end='',sep='')
    elif i%10 ==3:
        print(' ',i,end='',sep='')
prinit()

Fixed submission:
A = int(input())
for i in range(3, A + 1):
    if i%3 == 0 or i%10 == 3 or '3' in str(i):
        print('', i , end = '')
print()

Buggy python submission (verdict: Runtime Error):
x = int(input())
for i in range(1,x+1):
    if i%3 ==0:
        print(i,' '.end='',sep='')
    elif i%10 ==3:
        print(i,'',end='',sep='')

Fixed submission:
A = int(input())
for i in range(3, A + 1):
    if i%3 == 0 or i%10 == 3 or '3' in str(i):
        print('', i , end = '')
print()

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
for i in range(1,x+1):
    if i%3 ==0 or i%10 ==3:
        print(' ',i,end='',sep='')
    else:
        while True:
            if x <= i:
                print()
                break

Fixed submission:
A = int(input())
for i in range(3, A + 1):
    if i%3 == 0 or i%10 == 3 or '3' in str(i):
        print('', i , end = '')
print()

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
for i in range(1,x+1):
    if i%3 ==0 or i%10 ==3:
        print(' ',i,end='',sep='')
    else:
        while True:
            if x <= i:
                print()
                break
            else:
                pass

Fixed submission:
A = int(input())
for i in range(3, A + 1):
    if i%3 == 0 or i%10 == 3 or '3' in str(i):
        print('', i , end = '')
print()
Buggy python submission (verdict: Runtime Error):
x = int(input())
y = [int(i) for i in input().split()]
print("{0}".format(x3),end='')
for i in range(x-2, 0-1, -1):
    print(' {0}'.format(y[i]), end='')

Fixed submission:
input()
a = input().split()
a.reverse()
print(" ".join(a))

Buggy python submission (verdict: Runtime Error):
input()
a = input().split()
a.reverse()
print(" "join(a))

Fixed submission:
input()
a = input().split()
a.reverse()
print(" ".join(a))
Buggy python submission (verdict: Runtime Error):
S = []
H = []
C = []
D = []
for i in (S, H, C, D):
        for k in range(1, 13+1):
            i.append(k)


for u in range(0, int(input())):
    x, y = (i for i in input().split())
    if x == "S":
        S.remove(int(y))
    elif x == "H":
        H.remove(int(y))
    elif x == "C":
        H.remove(int(y))
    else:
        D.remove(int(y))
if len(S) > 0:
    for s in range(0, len(S)):
        print("S",S[s])
if len(H) > 0:
    for h in range(0, len(H)):
        print("H",H[h])
if len(C) > 0:
    for c in range(0, len(C)):
        print("C",C[c])
if len(D) > 0:
    for d in range(0, len(D)):
        print("D",D[d])

Fixed submission:
date = [
    "{0} {1}".format(s,r)
    for s in ('S', 'H', 'C', 'D')
    for r in range(1,13+1)
    ]

count= int(input())
for c in range(count):
    card = input()
    date.remove(card)

for c in date:
    print(c)
Buggy python submission (verdict: Runtime Error):
date= [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
    ]

count = int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v

for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()
    if bi < 3:
        print('#' * 20)

Fixed submission:
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
    ]

count = int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v

for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()
    if bi < 3:
        print('#' * 20)
Buggy python submission (verdict: Runtime Error):
date=[[],[],[]]
a,b,c=0,0,0
while True:
   if a < 0 and b < 0 and c < 0:
      break
   else:
      a,b,c =[int(i) for i in input().split()]
      date[0].append(a)
      date[1].append(b)
      date[2].append(c)
for h in range(0,len(date[0])-1):
   if date[0][h] == -1 or date[1][h] == -1:
      print("F")
   elif date[0][h] == date[1][h] == date[2][h]:
      break
   else:
      if date[0][h] + date[1][h] >= 80:
         print("A")
      else:
         if date[0][h] + date[1][h] >= 65:
            print("B")
         else:
            if date[0][h] + date[1][h] >= 50:
               print("C")
            else:
               if date[0][h] + date[1][h] >=30:
                  if date[2] >= 50:
                     print("C")
                  else:
                     print("D")
               else:
                  print("F")

Fixed submission:
date=[[],[],[]]
a,b,c=0,0,0
while True:
   if a < 0 and b < 0 and c < 0:
      break
   else:
      a,b,c =[int(i) for i in input().split()]
      date[0].append(a)
      date[1].append(b)
      date[2].append(c)
for h in range(0,len(date[0])-1):
   if date[0][h] == -1 or date[1][h] == -1:
      print("F")
   elif date[0][h] == date[1][h] == date[2][h]:
      break
   else:
      if date[0][h] + date[1][h] >= 80:
         print("A")
      else:
         if date[0][h] + date[1][h] >= 65:
            print("B")
         else:
            if date[0][h] + date[1][h] >= 50:
               print("C")
            else:
               if date[0][h] + date[1][h] >=30:
                  if date[2][h] >= 50:
                     print("C")
                  else:
                     print("D")
               else:
                  print("F")
Buggy python submission (verdict: Runtime Error):
n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]
for li in range(l):
    print(" ".join([str(s) for s in C[li]]))

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

A = []
B = []
C = []
for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))
Buggy python submission (verdict: Runtime Error):
import string

count = {x: 0 for x in string.ascii_lowercase}
lines =''
while True:
    try:
        lines += input().lower()
    except EOFError:
        break

for c in s:
    if 'a' <= c <= 'z':
        count[c] += 1

for key in string.ascii_lowercase:
    print("{0} : {1}".format(key,count[key]))

Fixed submission:
import string

count = {x: 0 for x in string.ascii_lowercase}
lines =''
while True:
    try:
        lines += input().lower()
    except EOFError:
        break

for c in lines:
    if 'a' <= c <= 'z':
        count[c] += 1

for key in string.ascii_lowercase:
    print("{0} : {1}".format(key,count[key]))
Buggy python submission (verdict: Runtime Error):
import math

x, y, X, Y = [int(i) for i in input().split()]

print (math.sqrt((x-X)**2+(y-Y)**2))

Fixed submission:
import math

x, y, X, Y = [float(i) for i in input().split()]

print (math.sqrt((x-X)**2+(y-Y)**2))
Buggy python submission (verdict: Runtime Error):
print(x ** 3)

Fixed submission:
x = int(input())

print (x ** 3)
Buggy python submission (verdict: Runtime Error):
S = input()

print (S//3600,":",S%3600//60,":",S%60,sep="")

Fixed submission:
S = int(input())

print (S//3600,":",S%3600//60,":",S%60,sep="")
Buggy python submission (verdict: Runtime Error):
a,b = [int(i) for i in int(input()).split]

if a > b:
    print("a > b")
if a < b:
    print("a < b")
if a == b:
    print("a == b")

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

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

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

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

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

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

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

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

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

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
a, b = [int(i) for i in input().split()]

d = a // b
r = a % b
f = a / b

print("{0} {1} {2:.5f}".format(d.r.f))

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

d = a // b
r = a % b
f = a / b

print("{0} {1} {2:.5f}".format(d, r, f))
Buggy python submission (verdict: Runtime Error):
r = int(input())

c = r * r *3.141592653589

print("{0:.6f}".format(c))

Fixed submission:
import math
r = float(input())

c = r * r *math.pi
cf = r *2 *math.pi

a = ("{0:.5f} {1:.5f}".format(c,cf))

print(a)

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

c = r * r *3.141592653589

a = ("{0:.5f}".format(c))

print((a),(a))

Fixed submission:
import math
r = float(input())

c = r * r *math.pi
cf = r *2 *math.pi

a = ("{0:.5f} {1:.5f}".format(c,cf))

print(a)

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

c = r * r *3.141592653589

a = ("{0:.6f}".format(c))

print((a),(a))

Fixed submission:
import math
r = float(input())

c = r * r *math.pi
cf = r *2 *math.pi

a = ("{0:.5f} {1:.5f}".format(c,cf))

print(a)

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

c = r * r *3.141592653589

a = ("{0:.6f}".format(c))

print((a),(a))

Fixed submission:
import math
r = float(input())

c = r * r *math.pi
cf = r *2 *math.pi

a = ("{0:.5f} {1:.5f}".format(c,cf))

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

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