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