Which statement is true about this sentence?
Each time X did the puzzle right, Y gave him a reward.
- X always did the puzzle right
- X sometimes did the puzzle wrong
Neither. There's no way to tell how many failures there were as written. The original phrasing could mean that Y gave a reward for every one of 15 successes and no failures, or that Y gave a reward for the only two successes out of 20 tries.
It is implied that X did the puzzle right at least once or twice, though, because otherwise it would have been better to use irrealis mood (which implies that something didn't actually happen), like this:
Each time X did the puzzle right, Y would have given him a reward.
Or this, which uses a statement of intent ("going to") along with the past tense to imply that the intent wasn't followed by an actual event:
Each time X did the puzzle right, Y was going to give him a reward.
In order for statement #1 to be true, the sentence would have to be something like this:
X did the puzzle several times, and Y gave him a reward for doing it right each time.
Here, "each" connects the reward (and, using "for", the success as well) back to every one of the attempts, not the successes.
For statement #2 to be true, the sentence might look like this:
X did the puzzle several times, and each time X managed to do the puzzle right, Y gave him a reward.
The sentence starts with the same emphasis on multiple attempts, but uses "manage to" to imply that there was a decent chance of not doing it. Together, those two elements suggest that X's successes were rare enough to be worth noting.