Codejam solving solution in F#