Quick actions

cmd+k|ctrl+k

Navigation

Languages

ACSL Mock Contest A1-2223 Question 5 WDTPD?

Snippet info

Language

Python

Visibility

public

Author

masterhun

Created

2023-12-30T06:16:44.704924Z

Updated

2023-12-30T06:20:03.274933Z



import math

ans = 0 

s = 0

a = int(input())

b = int(input())

c = int(input())

if a ** 2 + b ** 2 == c ** 2:
    ans = (a * b) / 2
else: 
    s = (a + b + c) / 2
    ans = math.sqrt(s * (s - a) * (s - b) * (s - c))

print(int(ans))
INFO