I downvoted an answer because I thought it didn't satisfy the original request, but the user who provided the answer replied to my comment that the solution was generalized a bit, and that a different case was provided from what OP used as an example.
It seems silly that I can't update my vote based on that information unless the post is edited.