aboutsummaryrefslogtreecommitdiff
path: root/test.jl
blob: 2d7b6decf990c668e1ba411a7b6b2fba834d7478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 = 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)