Https://hack.codingblocks.com/app/practice/1/382/problem

problem name is Finquest (Algo Contest) and problem link is here
https://hack.codingblocks.com/app/practice/1/382/problem

Can anyone explain how sample testcases work ?