title: Calculating GCD - how to check every element in list
body: <ul>
  <li>Multiple number inputs</li>
  </ul>
  
  <p>below is just how I chose to start writing my code</p>
  
  <pre><code>def main():
  
  numbers = input()
  if numbers == "0":
      exit()
  else:
      number_list = [int(i) for i in numbers.split()]
  
  def calculate_gcd(number_list):
      for i in range(1,smallest_number(number_list)+1):
          for n in range(0,len(number_list)):
              if number_list[n] % i == 0:
                 check_list += number_list[n]
  
  more code - but not important for the question im asking
  my code was hardly complete and only worked for max 3 size lists, sadly.
  </code></pre>
  
  <p>How I thought of logic</p>
  
  <ol>
  <li>Read input -> split by space, put it in list</li>
  <li>sort the list</li>
  <li>make a variable (divisor), and set it to 1</li>
  <li>while divisor &lt;= sortedlist[0]  (which is smallest in list)
  <strong>5. if every element % divisor == 0, then gcd = divisor, then divisor+=1</strong></li>
  <li>loop until it is no longer true</li>
  </ol>
  
  <p>Problem I found</p>
  
  <ol>
  <li>It requires stupid effort, it will actually not run and give runtime error.</li>
  <li>I'm having trouble finding a way to check <strong>No.5</strong> (in bold)
  I know that there is gcd function, but it only deals with two inputs.
  and it comes down to same question, how do I make sure 'all' elements divides down to zero?</li>
  </ol>
  
  <p>Any suggestion of making gcd logic and comment on No.5 (bold) ?</p>
  
  <p>Thank you</p>