Skip to main content
Spelling and grammar
Source Link
Toby Speight
  • 88.3k
  • 14
  • 104
  • 327

You may have made a trivial mistake: You calculated the number xx of divisors which is a huge number, then calculated xx modulo (10^7+310⁷+3). You want to an avoid the biggest number.

Let x2x2 be the product of the first two numbers of the solution, then replace x2x2 with x2x2 modulo (10^7+310⁷+3). Let x3x3 = x2x2 multiplied by the third number in the product etc. This avoids the large numbers.

In C or C++ arbitrary large numbernumbers are not supported. You will get a result very quickly that is completely wrong.

You may have made a trivial mistake: You calculated the number x of divisors which is a huge number, then calculated x modulo (10^7+3). You want to an avoid the biggest number.

Let x2 be the product of the first two numbers of the solution, then replace x2 with x2 modulo (10^7+3). Let x3 = x2 multiplied by the third number in the product etc. This avoids the large numbers.

In C or C++ arbitrary large number are not supported. You will get a result very quickly that is completely wrong.

You may have made a trivial mistake: You calculated the number x of divisors which is a huge number, then calculated x modulo (10⁷+3). You want to avoid the biggest number.

Let x2 be the product of the first two numbers of the solution, then replace x2 with x2 modulo (10⁷+3). Let x3 = x2 multiplied by the third number in the product etc. This avoids the large numbers.

In C or C++ arbitrary large numbers are not supported. You will get a result very quickly that is completely wrong.

Source Link
gnasher729
  • 3k
  • 14
  • 13

You may have made a trivial mistake: You calculated the number x of divisors which is a huge number, then calculated x modulo (10^7+3). You want to an avoid the biggest number.

Let x2 be the product of the first two numbers of the solution, then replace x2 with x2 modulo (10^7+3). Let x3 = x2 multiplied by the third number in the product etc. This avoids the large numbers.

In C or C++ arbitrary large number are not supported. You will get a result very quickly that is completely wrong.