//PascalABC.NET 3.1 сборка 1239
uses System;
uses System.Collections;
begin
var d := DateTime.Today;
repeat
d := d.AddDays(1);
until d.DayOfWeek = DayOfWeek.Sunday;
var Sundays := new Dictionary();
repeat
if Sundays.ContainsKey(d.Year) then
Sundays[d.Year] += 1
else
Sundays.Add(d.Year, 1);
d := d.AddDays((-7));
until d.Year <= 1;<br>
var max := Sundays.Values.Max;
Sundays.Where(x -> x.Value = max).Println;
end.