No, because it needs to be dynamic. Look at the code I attached (a little bit above). It is the whole code needed to solve that, and the main algorithm contains one for loop, one switch and 4 if. Not that much.