The 8 mountains have no name. If you want you can call them Mountain0 - Mountain7.
At each turn, aka at the beginning of while(1) loop, the system provides you 8 numbers, representing the heights of 8 mountains. You need to scanf() 8x times to read all values.
Then you use your algorithm to select 1 of them to shoot.
Then we finish this turn, and go back to beginning of while(1) again. The system provides 8 new numbers.
The point in my initial post was, we must do 8x scanf() all the time, even if we don’t need all 8 numbers in the algorithm. Otherwise, the un-read numbers will still be there in the next round.