They will keep their reputation even if you delete the question, as long as their reputation is not "recalculated" explicitly.
This is a "famous" operation which can be triggered by moderators, to re-evaluate the reputation with only existing (non-deleted) posts (the main use of it is for sockpuppet accounts). It can be also triggered on a larger scale, at least it happened once, when the reputation awarded for questions changed. See The global reputation recalc of March 2010.
Now about your particular case, in my opinion, you "reward the effort" with upvotes, and accept only the solution which solves your problem. However, if the initial problem was in your misunderstanding of something, leading to what you call a "non sense" question, then in a way this is indeed the answer which "gave the solution" to you. We all ask such kind of questions, there is nothing wrong in it. If you absolutely want to delete it, it's your right too.