using System.Collections.Generic;
public static void Main()
var populationYears = new Dictionary<int,int>();
var people = new Dictionary<int,int>();
foreach (var person in people)
for (var i = person.Key; i <= person.Value; i++)
if (!populationYears.ContainsKey(i))
populationYears.Add(i, 0);
populationYears.Where(y => y.Value == populationYears.Values.Max()).Select(popYear => popYear.Key).Dump();