HDOJ 1032(POJ 1207) The 3n + 1 problem

简介: HDOJ 1032(POJ 1207) The 3n + 1 problem

Description


Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.

Consider the following algorithm:

    1.       input n
    2.       print n
    3.       if n = 1 then STOP
    4.               if n is odd then   n <-- 3n+1
    5.               else   n <-- n/2
    6.       GOTO 2
目录
相关文章
HDOJ(HDU) 1570 A C
HDOJ(HDU) 1570 A C
96 0
HDOJ(HDU) 1570 A C
|
数据挖掘
HDOJ 1032(POJ 1207) The 3n + 1 problem
HDOJ 1032(POJ 1207) The 3n + 1 problem
124 0
|
Java 文件存储
HDOJ(HDU) 2123 An easy problem(简单题...)
HDOJ(HDU) 2123 An easy problem(简单题...)
149 0
|
Java 文件存储
HDOJ(HDU) 2132 An easy problem
HDOJ(HDU) 2132 An easy problem
100 0
HDOJ(HDU) 1673 Optimal Parking
HDOJ(HDU) 1673 Optimal Parking
118 0
HDOJ/HDU 2568 前进(简单题)
HDOJ/HDU 2568 前进(简单题)
120 0
HDOJ(HDU) 2153 仙人球的残影(谜一样的题、、、)
HDOJ(HDU) 2153 仙人球的残影(谜一样的题、、、)
109 0
HDOJ(HDU) 1898 Sempr == The Best Problem Solver?(水题、、、)
HDOJ(HDU) 1898 Sempr == The Best Problem Solver?(水题、、、)
120 0
HDOJ1002题A + B Problem II,2个大数相加
HDOJ1002题A + B Problem II,2个大数相加
109 0