• [1322] TT's First Trial

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Hello everyone! This contest I will tell a story about our heroine ——TT, what had she got through, and was she won at last? Now story beginning...
    Long time ago there was a girl named TT, she thought life was so boring that she wanted to explorer the world, but Mr.Cai said no, because it was too dangerous outside, TT can go out only when she passed the challenge.Everytime Mr.Cai will give TT a integer N, and give two operations:if n is a even number,N cut half,else N multiply by three and add one. TT should tell how many steps of operations N could become 1.
  • 输入
  • There are many cases. Each case give a integer N(1 <= N <= 2^32). Notice that all number is no more than the range of integer.
  • 输出
  • For each case, output the steps that N become 1.
  • 样例输入
  • 5
  • 样例输出
  • 5
  • 提示
  • 来源
  • Mr.Cai
  • 操作