The values are consistent with a very short tank.
It's a random test case, so if you don't give us the associated p array I'm affraid no one will be able to help you ^^
I'm getting failed for some very odd "correct" answers. What I will say is that the answers from my own code that have passed as correct work out at about 3$/foot for more than about five feet; however Testing for n = 11, apparently my answer should equal 110. Is that a glitch?