Finding prime factors

前端 未结 12 595
北海茫月
北海茫月 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 15:06

    600851475143 is outside of the range of an int

    void whosprime(int x) //<-----fix heere ok?
    {
        bool imPrime = true;
    
        for(int i = 1; i <= x; i++)
        {... 
          ...
    

提交回复
热议问题