Computer Science, asked by sangu2017, 3 months ago

Ancient Computer
Mehul has an Ancient computer from the year 1910. This computer has just 1 register. You can store only one positive integer at the register.
In one move you can shift its bits left or right by at-most 3 positions. Shifting right is only possible if you do not drop any ones.
Mehul wants to convert a positive integer A to B. You have to tell the minimum number of steps that Mehul will take. If Mehul cannot convert A
B, print -1.
Example: You can convert 4 (100) -> 8 (1000), You can convert 5 (101) to 10 (1010) but cannot make it 2 (10) since you cannot drop any is.
Function Description
Complete the ancientComputer function in the editor below. It has the following parameter(s):
Description
Name
Type
Parameters
The first number
A А
INTEGER
В.
The second number
INTEGER
Return
The function must return an INTEGER denoting the minimum
number of steps to convert A to B.
Activate Windows
Go to Settings to activate Wind​

Answers

Answered by pandeyy296
0

Answer:

bbbbbbbbbbbbbbbbbbbbbb

Answered by rdxmutasim
0

Answer:

toyotoyorsyorsyods6ors69rs6toytoyorsyorsyods6ors69rs6rztoyofjiTSiTSuRAitsziTStIS58SI5S5IS5Isi5S5IS5IS5IS58Stxi,go,zoys/*@this,it¥_#-*/@<♡•ykSoyE6oesi5eatOEtiE6oes6oseo6zeyodyortieso6seiTWo5seo6sei5swO5W6ose6osetoes6oes6seo6oae6ostIE70tiz6ozo6zeyozypxrtozeupxyozeuxpr6oze7xprtize7pxrtIE7pdri67pzr6oze7rpzyorzuprzifcuf ivy difuuff8f8ri food ic uncut kghcxyleaurls6o4w7prs6oe7p5s6o7lra6ale6laro7a47o4a7p4w7p4w7p4s7p4s7o4a7p4s7p4s7ps7p4w8p5e8pe47ps4oyduzitdfizgoxris0yreitdurzitsogcsitits7w4yodyrsitxjf,yof84e6pugursigxlYEulyodzyodzTIS7dtpyodzyodztoez7pdr5Iw6rostyd had,yet,Lucy,dv9y6ze9ctyoyc7rxoyvts%#&fdgdyfydûu

Similar questions