From 7d881a8f64cdef12df52276e008eb350737ef41b Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Fri, 11 Sep 2020 11:04:48 -0500 Subject: Add test.jl --- test.jl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test.jl diff --git a/test.jl b/test.jl new file mode 100644 index 0000000..fd8944a --- /dev/null +++ b/test.jl @@ -0,0 +1,24 @@ +# Julia + +function gcd(a, b) + if (b > 0) return gcd(b, a % b) + else return a + end +end + +println("test") + +N = 1000 +A = [] +for i in 0:N-1 + push!(A, i) +end + +ans = 0 +for i in A + for j in A + global ans + ans += gcd(i, j) + end +end +println(ans) -- cgit v1.2.3-70-g09d2