Whilst I don't believe a Neural Network is appropriate for this, as Alvaro said, the applicability to games is limited and unnecessary when you can easily compute the correct answer, it can be done using a neural network.
Premise: A neural network usually has a fixed number of inputs. Since this game data in its raw form is variable, we need to do some pre-processing, sometimes called feature extraction. Pretend we are programming a neural network to identify letters in an image. The letter could be made from any number of pixels. To make the data fit the network we have to define features. A common one for this example would be dimension ratio. Letter height/width gives us a single value, and helps us identify the letter. A lower case 'o' for example would have a ratio of 1, where the letter 'l' may have a ratio of 2 as it's height is roughly double it's width.
You could use a similar system, one example feature could be the ratio of coins above the player to the ratio of coins below. Combine that with distance and direction of nearest coin, and you have a very simple network that will do what you ask. You could get more complex and calculate some fairly complex features, for example, total displacement to collect coins below against coins above.
To be honest the only reason I use neural networks for anything in games is personality. To change the behavior of a network, you simply load in a different set of weights and bam, you instantly have a more cautious/aggressive AI. But to sum up here is an example network for your game, it is very simple and could have many features added.
3 Inputs, 1 output
Input 1: Ratio of coins, number above/number below
Input 2: Distance player must travel to collect all coins above
Input 3: Distance player must travel to collect all coins below
Output 1: True means player travels down, false means player travels up
Hopefully something here will be helpful. In the above example, input 2 and 3 can be combined into a single input fairly easily. I think I would also have 2 outputs. This would allow you to pick a random direction when both outputs are false or true, to add some randomness to the AI.
Eg.
Output 1: True (Player should go up)
Output 2: True (Player should go down) If you have a system like this, then you could pick randomly when ever the network produced conflicting results, for more precise play use a single output.