Problem solving isn't orthogonal to having genuine expertise. Loads of awful, brittle, hard-to-read, but working, code gets written every day by people who are good at finding a solution but haven't RTFM, so to speak.
for example, if you are using strings to do addition, why the fuck aren't you allows to to atoi? also, why are you using strings to hold numbers?
everything to do with that question is something that you'd insta-reject in a diff/pr/mr.
Surely converting from string to int, validating it, catching errors and generally making it nice, is a much better test?
Its like going to an interview for a copywriter(someone who writes text) for safety sign company, and they ask you to make a riddle in English, but you can't use any words that are derived from Latin. Sure it shows an impressive command of both etymology and english, but its totally opposite to making clear, easy to understand text.