Here we can pre-compute the outcomes and especially for part 2 it's simply a subtraction to get the wanted output.