using System.Collections.Generic;
static int[] GetSupplyIndexesBySupplyNumber(int[] actualPowerSupplyCounts, int supplyNumber)
var suppliesStartIndex = actualPowerSupplyCounts.Length * (supplyNumber - 1);
var result = new List<int>();
for (int i = 0; i < actualPowerSupplyCounts.Length; i++)
if (actualPowerSupplyCounts[i] >= supplyNumber)
result.Add(suppliesStartIndex + i);
public static void Main()
var actual = new [] {0, 1, 2, 3, 4};
var supplyNumbers = new [] {1, 2, 3, 4};
foreach (var supplyNumber in supplyNumbers)
var indexes = GetSupplyIndexesBySupplyNumber(actual, supplyNumber);
Console.WriteLine($"{supplyNumber} => {String.Join(",", indexes)}");