fork download
  1. while wyjscie = gets
  2. for x.to_i
  3. end
  4.  
  5. def nwd(x,y)
  6. while y!=0
  7. z=y
  8. y=x%y
  9. x=z
  10. return x
  11. end
  12.  
  13. wynik = t[1]
  14. licznik = 2
  15. while licznik<=t[0]
  16. wynik = nwd(wynik, t[licznik])
  17. licznik+=1
  18. end
  19. puts wynik
  20. end
Runtime error #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
Standard output is empty