Manmohan loves pattern 1

code is working perfectly fine, only problem is one of the testcases plzz help
https://ide.codingblocks.com/s/60338

now its running perfectly fine no need to reply it.