- 博客(6)
- 资源 (4)
- 收藏
- 关注
原创 角谷猜想
@[角谷]1. List item角谷必备日本一位中学生发现一个奇妙的“定理”,请角谷教授证明,而角谷教授无能为力,于是产生角谷猜想。猜想的内容是:任给一个自然数,若为偶数除以2,若为奇数则乘3加1,得到一个新的自然数然后按照上面的法则继续演算,若干次后得到的结果必然为1,请编程验证。namespace 角谷猜想{class Program{static void Main(st...
2020-03-15 18:00:28
738
角谷猜想.csproj
对于角谷算法的验证和猜想,我们必须去探求一些不知道的资源和方法 。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
</configuration>
2020-03-15
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 角谷猜想
{
class Program
{
static void Main(string[] args)
{
for (int n = 1; n <= 10000; n++)
{
int a = n;
while (a != 1)
{
Console.Write("" + a);
if (a % 2 == 1)
a = a * 3 + 1;
else
a = a / 2;
}
Console.Write("" + a);
}
}
}
}
2020-03-15
DesignTimeResolveAssemblyReferencesInput.cache
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
</configuration>
2020-03-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅