0

I am using NTL's ZZ class to work with large numbers. Suppose I have 10000 such numbers, and I want to find the product of all these numbers. Calculating the product of these numbers takes about only 30 secs. However, to print the product of these numbers to the console of the file requires 30 mins! Below is the command I used.

cout << product << "\n"

Why is this so? Is there any way to speed up the printing of the product of the 10000 numbers? Thanks in advance

timrau
  • 22,578
  • 4
  • 51
  • 64
meta_warrior
  • 389
  • 1
  • 6
  • 18

0 Answers0