<jupyter_start><jupyter_text>An irrational decimal fraction is created by concatenating the positive integers:    0.123456789101112131415161718192021...It can be seen that the 12th digit of the fractional part is 1.If dn represents the nth digit of the fractional part, find the value of the following expression.    d1 × d10 × d100 × d1000 × d10000 × d100000 × d1000000<jupyter_code>open System.Text

let limit = 1000000

let appendChampernowne (sb:StringBuilder) n =
    sb.Append (string n) |> ignore
    n

let rec buildChamp' (sb:StringBuilder) n =
    if (sb.Length) > limit then (sb.ToString())
    else buildChamp' sb (appendChampernowne sb (1 + n))
    
let buildChamp n = 
    buildChamp' (new StringBuilder()) n
    
let champernowne = (buildChamp 0).ToCharArray()

[1; 10; 100; 1000; 10000; 100000; 1000000;]
|> List.map (fun i -> champernowne.[i-1])
|> List.map (string >> int)
|> List.fold (fun acc element -> acc * element) 1<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10515463917525773, 'fraction_numerical': 0.10721649484536082, 'mean_word_length': 4.110526315789474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '534123', 'license': 'MIT', 'n_tokens_mistral': 410, 'n_tokens_neox': 318, 'n_words': 116, 'path': "Problem 040 - Champernowne's constant.ipynb", 'repo_name': 'smcl/ProjectEulerJupyter', 'size': '970'}