Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

11 lines (8 sloc) 0.335 kB
%% Problem
%% ---------------------
%% How many Sundays fell on the first of the month during
%% the twentieth century (1 Jan 1901 to 31 Dec 2000)?
%% ---------------------
-module(p019).
-export([solve/0]).
solve() -> length([ {M, Y} || Y <- lists:seq(1901, 2000), M <- lists:seq(1, 12), calendar:day_of_the_week(Y, M, 1) =:= 7 ]).
Jump to Line
Something went wrong with that request. Please try again.