結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー regerege
提出日時 2017-04-18 22:11:54
言語 F#
(F# 4.0)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 271 bytes
コンパイル時間 14,435 ms
コンパイル使用メモリ 190,624 KB
実行使用メモリ 31,232 KB
最終ジャッジ日時 2024-06-25 23:30:21
合計ジャッジ時間 18,598 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (380 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 #

let p = [2;3;5;7;11;13]
let c = [4;6;8;9;10;12]
let s = List.collect (fun x -> List.map (fun y -> x,y,x*y) c) p
let last (a,b,c) = c
let calc (n:int) = decimal(n) / 36M
let N = stdin.ReadLine() |> int
s |> List.filter (last >> (=)N) |> List.length
|> calc
|> printfn "%M"
0