whats srong in this https://ide.codingblocks.com/#/s/23973
ques link https://hack.codingblocks.com/contests/c/452/819
Tavas and saddas wrong ans
The order should be 4, 7, 44, 47, 74, so on.
Your order is 4, 7, 44, 74, 47
ok but whats the problem in the code.
what mistake i have done
Just change your ans=ans+(1<<i)
to ans=ans+(1<<(len-i-1))
passed all the test cases .thank u very much
1 Like