2014-05-26から1日間の記事一覧

Project Euler 19

C# PE

Problem 19 using System; class PE019 { static void Main() { int ans = 0; var d = new DateTime(1901, 1, 1); var endDate = new DateTime(2000, 12, 31); while (d < endDate) { if (d.DayOfWeek == DayOfWeek.Sunday) { ans++; } d = d.AddMonths(1); …