Exercism c++ problem

isn't that a pretty "obscure" approach