結果
問題 | No.1487 ぺんぎんさんかっけー |
ユーザー |
![]() |
提出日時 | 2021-04-23 21:41:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 1,000 ms |
コード長 | 767 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,864 KB |
最終ジャッジ日時 | 2024-07-04 07:46:34 |
合計ジャッジ時間 | 2,509 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 |
ソースコード
import sysfrom math import sin,cossys.setrecursionlimit(10**7)def I(): return int(sys.stdin.readline().rstrip())def MI(): return map(int,sys.stdin.readline().rstrip().split())def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))def LI2(): return list(map(int,sys.stdin.readline().rstrip()))def S(): return sys.stdin.readline().rstrip()def LS(): return list(sys.stdin.readline().rstrip().split())def LS2(): return list(sys.stdin.readline().rstrip())a,b,c = MI()s = (a+b+c)/2ans = (s*(s-a)*(s-b)*(s-c))**.5A = (a**2+c**2-b**2)/(2*a*c)A = (1-A**2)**.5B = (a**2+b**2-c**2)/(2*a*b)B = (1-B**2)**.5C = (b**2+c**2-a**2)/(2*b*c)C = (1-C**2)**.5ans -= a**2*c**2*A/(8*a*c)ans -= a**2*b**2*B/(8*a*b)ans -= b**2*c**2*C/(8*b*c)print(ans)