Skip to content

Commit

Permalink
Solve Triangle in python
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Nov 11, 2024
1 parent 9b9ea15 commit f0d6237
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions solutions/beecrowd/1043/1043.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import sys

for line in sys.stdin:
a, b, c = map(float, line.split())

if a < b + c and b < a + c and c < a + b:
print(f'Perimetro = {a + b + c:.1f}')
else:
print(f'Area = {c * (a + b) / 2:.1f}')

0 comments on commit f0d6237

Please sign in to comment.