有这几个已经很乐观了啊 写了下代码:// HugeCalcDemo.cpp : Defines the entry point for the console application.
//
// Project -> Setting -> C/C++ -> Code Generation --> Use run-time library:
// Win32 Debug: Debug Multithreaded DLL
// Win32 Release: Multithreaded DLL
#include <iostream.h>
#include "../../../HugeCalc_API/CppAPI/Include/HugeCalc.h" // 公共接口
#include "../../../HugeCalc_API/CppAPI/Include/HugeInt.h" // 10进制系统
#include "../../../HugeCalc_API/CppAPI/Include/HugeIntX.h" // 16进制系统
#pragma message( "automatic link to ../../../HugeCalc_API/CppAPI/Lib/HugeCalc.lib" )
#pragma comment( lib, "../../../HugeCalc_API/CppAPI/Lib/HugeCalc.lib" )
int main(int argc, char* argv[])
{
// printf("Hello World!\n");
cout << "Call " << HugeCalc::GetVer() << endl << endl;
if ( HC_LICENSE_NONE == HugeCalc::GetLicenseLevel())
{
cout << endl << "警告:您未通过 HugeCalc.dll 的许可认证!" \
<< endl << endl << "解决方案可选下列方案之一:" \
<< endl << " 一、请将本程序移动到“/CopyrightByGuoXianqiang/[../]”目录下运行;" \
<< endl << " 二、或请在 HugeCalc.chm 中进行注册(一劳永逸)。" \
<< endl << endl;
system( "pause" );
return (-1);
}
CHugeInt hugeNum;
UINT32 i, j, k = 1;
UINT32 u32LBound, u32UBound;
UINT32 u32BufferSize;
UINT32 *p, *lpPrimeBuffer;
// 初始化
HugeCalc::EnableTimer( TRUE );
HugeCalc::ResetTimer();
u32LBound = 1;
u32UBound = 10;
for ( i = 1; i < 8; ++i )
{
u32BufferSize = HugeCalc::GetPrimeCount( u32LBound, u32UBound );
lpPrimeBuffer = new UINT32[ u32BufferSize ];
HugeCalc::GetPrimeList( lpPrimeBuffer, u32BufferSize, u32LBound, u32UBound );
for ( j=0, p=lpPrimeBuffer; j<u32BufferSize; ++j, ++p )
{
hugeNum.DecLShift( i ) += *p;
if ( hugeNum.IsPrime() )
{
cout << endl << "No." << k + j << "\tPrime=" << *p
<< "\tTotal Digits = " << hugeNum.GetDigits();
}
}
k += u32BufferSize;
delete []lpPrimeBuffer;
cout << endl << "已耗时:" << HugeCalc::GetTimerStr( FT_DOT06SEC_s ) << endl << endl;
u32LBound = u32UBound;
u32UBound *= 10;
}
system( "pause" );
return 0;
} :)
这个题目有结果的
搜到了结果
不过看不太明白
你运行下
看和网上结果比较下
http://mathworld.wolfram.com/Smarandache-WellinNumber.html 老早就曾想到这个题目,感觉很有趣,但意义似乎不大,
没想到已专门给了这类数一个名称:
The nth Smarandache-Wellin number is the consecutive number sequence consisting of a concatenation of the digits of the first n primes
我运行了一下程序,与 14# 所给链接数据一致。 :)
那可以找更大的素数的
页:
1
[2]