+ 1
least steps
c++ code for the least possible steps for reaching a number just by multiplying by 2 and adding 1. example: for 25 0+1->1*2->2+1->3*2->6*2->12*2->24+1=25. the least steps are 7.
1 Réponse
c++ code for the least possible steps for reaching a number just by multiplying by 2 and adding 1. example: for 25 0+1->1*2->2+1->3*2->6*2->12*2->24+1=25. the least steps are 7.