https://www.hackerrank.com/contests/hourrank2/challenges/gugasfunction . I read the editorial but it was very terrible. How to solve this? asked 04 Nov '15, 00:44

Since the contest is of 1 hour, just try to do the problem in another way also(shortcut) as follows. f(1) = 0 f(2) = 1 f(3) = 5 f(4) = 17 So, now that u have got some numbers check for the common formula/pattern in OEIS(CLICK HERE FOR SOLUTION) So, the formula is (n1)*2^n + 1. so, in this way, u can get AC in 58 minutes max. but the most important thing is that u must definitely read and understand the editorial after the contest. PS: Even i also did not get this question accepted becoz i took n^2 instead of 2^n and messed up everything. Also,even i did not understand editorial properly. answered 04 Nov '15, 20:38
