Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/McNuggets-problem/F-Sharp/mcnuggets-problem.fs
Normal file
3
Task/McNuggets-problem/F-Sharp/mcnuggets-problem.fs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// McNuggets. Nigel Galloway: October 28th., 2018
|
||||
let fN n g = Seq.initInfinite(fun ng->ng*n+g)|>Seq.takeWhile(fun n->n<=100)
|
||||
printfn "%d" (Set.maxElement(Set.difference (set[1..100]) (fN 20 0|>Seq.collect(fun n->fN 9 n)|>Seq.collect(fun n->fN 6 n)|>Set.ofSeq)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue