Julia で Project Euler #1「3と5の倍数」

1 min read読了の目安(約300字
function f001(n::Int64)
    result = 0
    for i in 1:(n - 1)
        if (i % 3 == 0) || (i % 5 == 0)
            result += i
        end
    end
    return result
end

f001(10)
# 23

f001(1000)
# 233168