Thiên Phúc Bùi
Giới thiệu về bản thân
def ktratamgiac(a, b, c):
canh = sorted([a, b, c])
a, b, c = canh[0], canh[1], canh[2]
return a**2 + b**2 == c**2
a,b,c=map(int,input().split())
if ktratamgiac(a,b,c):
p=(a+b+c)/2
s=(p*(p-a)*(p-b)*(p-c))**0.5
else:
s=-1
print(s)
python nha bạn
A \(\approx2.94\)
\(\sim2.94\)
a)\(\dfrac{7}{12}+\dfrac{5}{24}+\dfrac{5}{12}+\dfrac{19}{24}\)
=\(\left(\dfrac{7}{12}+\dfrac{5}{12}\right)+\left(\dfrac{5}{24}+\dfrac{19}{24}\right)\)
=\(\dfrac{12}{12}+\dfrac{24}{24}\)
=1+1
=2
b)\(\dfrac{5}{18}+\dfrac{4}{15}+\dfrac{7}{18}+\dfrac{1}{15}\)
=\(\left(\dfrac{5}{18}+\dfrac{7}{18}\right)+\left(\dfrac{4}{15}+\dfrac{1}{15}\right)\)
=\(\dfrac{2}{3}+\dfrac{1}{3}\)
=\(\dfrac{3}{3}\)
=1
c)\(\dfrac{1}{5}+\dfrac{5}{9}+\dfrac{4}{5}+\dfrac{1}{9}+\dfrac{3}{9}\)
=\(\left(\dfrac{1}{5}+\dfrac{4}{5}\right)+\left(\dfrac{5}{9}+\dfrac{1}{9}+\dfrac{3}{9}\right)\)
=\(\dfrac{5}{5}+\dfrac{9}{9}\)
=1+1
=2
d)\(\dfrac{1}{3}+\dfrac{1}{6}+\dfrac{4}{3}+\dfrac{2}{6}+\dfrac{2}{3}+\dfrac{5}{6}\)
=\(\left(\dfrac{1}{3}+\dfrac{4}{3}+\dfrac{2}{3}\right)+\left(\dfrac{1}{6}+\dfrac{2}{6}+\dfrac{5}{6}\right)\)
=\(\dfrac{7}{3}+\dfrac{8}{6}\)
=\(\dfrac{7}{3}+\dfrac{4}{3}\)
=\(\dfrac{11}{3}\)