using System.Collections.Generic;
using System.Diagnostics;
bool verifyResults = true;
RunSolution(Solution1, digits, sum, verifyResults);
void RunSolution(Func<int, int, bool, (int, List<long>)> solution, int digits, int sum, bool verifyResults) {
throw new InvalidOperationException("The value of sum is too high for the number of digits.");
Stopwatch stopWatch = new Stopwatch();
(var count, var results) = solution(digits, sum, verifyResults);
Console.WriteLine($"Found {count} results in {stopWatch.Elapsed}");
results.ForEach(i=>Console.WriteLine("{0}\t",i));
(int count, List<long> results) Solution1(int digits, int sum, bool returnResults) {
var results = new List<long>();
int begin = (int) Math.Pow(10, digits - 1);
int end = (int)Math.Pow(10, digits)-1;
int digitCounter = currentNum;
while(digitCounter != 0){
digitSum += digitCounter % 10;
digitCounter = digitCounter /10;