UVa 694 The Collatz Sequence
摘要:
The Collatz SequenceAn algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1:Choose an arbitrary positive integer A as the first item in the sequence.Step 2:If A = 1 then stop.Step 3:If A is even, then replace A by A / 2 and go to step 2.Step 4:If A is. 阅读全文
posted @ 2013-05-03 23:11 Raphael_W 阅读(105) 评论(0) 推荐(0) 编辑