This kind of approach is fine for a junior. I'd even encourage it because there's an attempt to change the parameters of the problem which is something we often have to teach people as they progress.
For a senior position, not so much. I mean, it might be that they're ignorant or stupid, in which case you've probably dodged a bullet when they don't hire you. Or it might be something else entirely.
A more sensible approach, in my view, would be to ask what they were looking for with the HackerRank test in a subsequent face to face. If they say that they don't have a better way to determine developer competency then, sure, suggest that you may be able to help with that when you join.
If it were me interviewing, I'd be particularly interested in suggestions that a) were developed from successful prior hiring practices and/or b) not so bleeding obvious as "look at their Github page".