Finding prime factors

前端 未结 12 601
北海茫月
北海茫月 2020-12-29 14:24
#include 
using namespace std;

void whosprime(long long x)
{
    bool imPrime = true;

    for(int i = 1; i <= x; i++)
    {
        for(int z =          


        
12条回答
  •  南笙
    南笙 (楼主)
    2020-12-29 14:44

    Since 600851475143 is out of scope for int as well as single long type wont work here hence here to solve we have to define our own type here with the help of typedef. Now the range of ll is some what around 9,223,372,036,854,775,807.

    typedef long long int LL

提交回复
热议问题