Robot movement on a grid

https://hack.codingblocks.com/app/contests/949/p/1296


please help,getting wrong answer.