You are given an integer x which is initially 1. You can perform 2 operation make x = x-1 or x=2*x. You need to perform exactly K such operations. Find if it is possible to make number N from X. Note N and K is very high upto 10^18.
Can someone pls help with this problem
You are given an integer x which is initially 1. You can perform 2 operation make x = x-1 or x=2*x. You need to perform exactly K such operations. Find if it is possible to make number N from X. Note N and K is very high upto 10^18.