using System.Collections.Generic;
public static void Main()
var isReasonableDelay = IsReasonableDelay(delay);
Console.WriteLine(isReasonableDelay);
private static bool IsReasonableDelay(int delay)
var dividendAddendsForDivisor = new Dictionary<int, int[]>
[10] = new[] { 12, 14, 18, 20 },
[14] = new[] { 6, 10, 16, 28, 32, 40 },
[22] = new[] { 22, 24, 62 },
[26] = new[] { 56, 58, 60, 64, 66, 68, 70, 74, 76, 80, 88 },
var dividendAddendsForDivisorVerbose = new Dictionary<int, int[]>
[10] = new[] { 10 + 2, 10 + 4, 10 + 8, 10 + 10 + 0 },
[14] = new[] { 6, 10, 14 + 2, 14 + 14 + 0, 14 + 14 + 4, 14 + 14 + 12 },
[16] = new[] { 16 + 16 + 4 },
[18] = new[] { 18 + 8, 18 + 18 + 14 },
[22] = new[] { 22 + 0, 22 + 2, 22 + 22 + 18 },
[26] = new[] { 26 + 26 + 4, 26 + 26 + 6, 26 + 26 + 8, 26 + 26 + 12, 26 + 26 + 14, 26 + 26 + 16, 26 + 26 + 18, 26 + 26 + 22, 26 + 26 + 24, 26 + 26 + 26 + 2, 26 + 26 + 26 + 10 },
[32] = new[] { 32 + 12 },
var dividendAddendsForDivisorMinimal = new Dictionary<int, int[]>
[10] = new[] { 2, 4, 8, 0 },
[14] = new[] { 6, 10, 2, 0, 4, 12 },
[22] = new[] { 0, 2, 18 },
[26] = new[] { 4, 6, 8, 12, 14, 16, 18, 22, 24, 2, 10 },
var dividendAddendsForDivisorMinimalSorted = new Dictionary<int, int[]>
[10] = new[] { 0, 2, 4, 8 },
[14] = new[] { 0, 2, 4, 6, 10, 12 },
[22] = new[] { 0, 2, 18 },
[26] = new[] { 2, 4, 6, 8, 10, 12, 14, 16, 18, 22, 24 },
foreach (var entry in dividendAddendsForDivisor)
foreach (var dividendAddend in entry.Value)
var dividend = delay + dividendAddend;
if (dividend % divisor == 0)