static int MinImpossible(int [] coin)
while (i < coin.Length && coin[i] <= r)
public static void Main()
Test(new[]{ 1, 1, 3, 7 });
public static void Test(int [] coin)
Console.WriteLine("Coins ({0}) can't pay sum of {1}", string.Join(" ", coin), MinImpossible(coin));