Problem 3289 · Easy
Remember each value as it is scanned; the two values that arrive a second time are the answer.
Open the interactive visualisation