結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー taktak
提出日時 2018-09-09 13:28:13
言語 F#
(F# 4.0)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 453 bytes
コンパイル時間 6,923 ms
コンパイル使用メモリ 191,960 KB
実行使用メモリ 31,228 KB
最終ジャッジ日時 2024-04-15 19:51:32
合計ジャッジ時間 8,182 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
30,848 KB
testcase_01 AC 62 ms
30,848 KB
testcase_02 AC 61 ms
31,228 KB
testcase_03 AC 60 ms
30,848 KB
testcase_04 AC 61 ms
30,840 KB
testcase_05 AC 61 ms
30,848 KB
testcase_06 AC 60 ms
30,976 KB
testcase_07 AC 61 ms
30,840 KB
testcase_08 AC 60 ms
30,848 KB
testcase_09 AC 60 ms
31,072 KB
testcase_10 AC 59 ms
30,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (209 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
open Microsoft.FSharp.Core

[<Measure>] type cal
[<Measure>] type cm
let R() = stdin.ReadLine()
let toMeasure = LanguagePrimitives.FloatWithMeasure

let C = R() |> float |> fun x -> toMeasure x:float<cal/cm^3>
let Rin, Rout = 
    let t = R().Split() |> Array.map float |> Array.map (fun x -> toMeasure x:float<cal/cm^3>)
    t.[0], t.[1]

let V = 0.25 * Math.PI ** 2.0 * (Rout + Rin) * (Rout - Rin) * (Rout - Rin)

V * C |> stdout.WriteLine
0