using System.Collections.Generic;
static List<int> Values = new List<int>{0,0,0,1,1,2,3,4,4,5,6,9,10,12,15,20};
public static void Main()
Console.WriteLine(GetValues(Values, 10).Count);
Console.WriteLine(GetValues(Values, 5).Count);
static List<int> GetValues(List<int> values, int target)
List<int> total = new List<int>();
foreach(int val in values.Where(value => value <= target).OrderByDescending(value => value))
if(total.Sum() == target) return total;