Many different ways to encode functionality

It seems that you don’t like my code for
Exercise 2: Pineapple route emissions

It calculates the correct routes and emissions, though.