User talk:Biwkina: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Tower of Hanoi c++: new section)
 
(No difference)

Latest revision as of 21:26, 21 December 2016

Tower of Hanoi c++

Our task - for a given serial number (numbered from 1) the correct solution to determine the serial number of the disk, which made this move.

We believe that the original number of drives is enough for the demanded number of moves.

Input

The only line of input contains the number n (1 ≤ n ≤ 263) we are interested in running.

Output

Print the serial number of the disk, which made n-th move.

Input example Sample 1 1

Sample 2 6 Output example Sample 1 0

Sample 2