Skip to content

Instantly share code, notes, and snippets.

@t0yv0
t0yv0 / euler19.fs
Created July 29, 2011 20:22 — forked from dzyubam/euler19.py
Project Euler -- Problem 19
let euler19 () =
let mutable k = 0
for y in 1901 .. 2000 do
for m in 1 .. 12 do
let date = System.DateTime(y, m, 1)
if date.DayOfWeek = System.DayOfWeek.Sunday then
k <- k + 1
k
stdout.WriteLine(euler19 ())