title: How to avoid overflow error when finding LCM for series of large integers
body: <p>I need to find least common divisor for a series of numbers 
  (up to 100 000 numbers, each of them is in the range of [0, 2 000 000 000])</p>
  
  <p>I am using the following algorithm lcm(a,b) = (a/gcd(a,b)) * b</p>
  
  <p>The standard method of finding lcm for for than 2 numbers lcm(a, lcm(b,c))... is working for small input values.</p>
  
  <p>However, for large input, it starts giving overflow error even if i used long long int...</p>
  
  <p>How can I avoid having overflow error for many larger integer values?</p>
  
  <p>Thank you for the help</p>