Regarding a hackerblock problem

https://hack.codingblocks.com/app/practice/1/1271/problem
can I get a solution for this problem