LOL, this a troll of a problem - as others say, the input array isn't the normal order of the coins - they even add the values of each of these coins in the correct order later in the description just to mess with you XD
I'm also amused by how many people are passionately defending the problem-creator - I can't decide if it's a brilliant troll or just plain old annoying, but being a teacher's pet is the incorrect answer to life (even if it gets you far).