結果

問題 No.3151 natural math of inscribed circle
ユーザー tomcat1233
提出日時 2025-05-20 22:20:00
言語 Haskell
(9.10.1)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 4,585 ms
コンパイル使用メモリ 175,872 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-06-20 03:00:59
合計ジャッジ時間 2,580 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.10.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

heron a b c = sqrt ((a + b + c)*(-a + b + c)*(a - b + c)*(a + b - c)) / 4

solve a b c = 2 * s / (a + b + c)
  where s = heron a b c

main :: IO ()
main = do
  [a, b, c] <- map read . words <$> getLine :: IO [Double]
  let ans = solve a b c
  print ans
0