文件名称:Euler-Engineering
介绍说明--下载内容来自于网络,使用问题请自行百度
Euler工程,找最长的数列!
定义一个正整数数列,其迭代公式为:
n = n/2 (当n为偶数)
n = 3n+1 (当n为奇数)
比如从n=13开始,计算这个数列得:
13 ->40->20->10->5->16->8->4->1
这个数列一共有10项。
要求在小于1百万的所有起始数中,哪个数能产生最长的数列。
-Euler project, find the longest series! Define a positive integers, the iterative formula: n = n/2 (when n is even) n = 3n+1 (when n is odd), n = 13 for example, from the beginning, this series was calculated: 13-> 40-> 20-> 10-> 5-> 16-> 8-> 4-> 1 this series a total of 10 items. Requires less than 1 million threshold in all, which few can produce the longest series.
定义一个正整数数列,其迭代公式为:
n = n/2 (当n为偶数)
n = 3n+1 (当n为奇数)
比如从n=13开始,计算这个数列得:
13 ->40->20->10->5->16->8->4->1
这个数列一共有10项。
要求在小于1百万的所有起始数中,哪个数能产生最长的数列。
-Euler project, find the longest series! Define a positive integers, the iterative formula: n = n/2 (when n is even) n = 3n+1 (when n is odd), n = 13 for example, from the beginning, this series was calculated: 13-> 40-> 20-> 10-> 5-> 16-> 8-> 4-> 1 this series a total of 10 items. Requires less than 1 million threshold in all, which few can produce the longest series.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Euler Engineering.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.