initial commit

This commit is contained in:
2025-08-03 20:16:55 -07:00
commit 87a130499d
89 changed files with 10241 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
module _112
let bouncy90 =
let bouncy n =
common.numDigits n
|> Seq.pairwise
|> Seq.filter (fun (i,j) -> i <> j)
|> Seq.map (fun (i,j) -> i > j)
|> Seq.distinct
|> Seq.length > 1
common.allIntegers
|> Seq.skip 1
|> Seq.map (fun i -> (i,bouncy i))
|> Seq.scan (fun (t,f) (i,b) ->
if b then (t+1,f) else (t,f+1)) (0,0)
|> Seq.map (fun (t,f) -> if t = 0 then 0.0 else ((float t)/((float t)+(float f))))
|> Seq.findIndex ((<=) 0.99)