From 76b651cc674201b9dd49be770e6ae27246eceae0 Mon Sep 17 00:00:00 2001 From: Andrew Shitov Date: Fri, 4 Dec 2020 18:30:41 +0100 Subject: fix filename extension --- challenge-089/ash/julia/ch-1.jl | 15 +++++++++++++ challenge-089/ash/julia/ch-1.julia | 15 ------------- challenge-089/ash/readme.md | 44 +++++++++++++++++++------------------- 3 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 challenge-089/ash/julia/ch-1.jl delete mode 100644 challenge-089/ash/julia/ch-1.julia diff --git a/challenge-089/ash/julia/ch-1.jl b/challenge-089/ash/julia/ch-1.jl new file mode 100644 index 0000000000..22f30004b4 --- /dev/null +++ b/challenge-089/ash/julia/ch-1.jl @@ -0,0 +1,15 @@ +# To run: +# $ julia ch-1.julia 100 +# 13015 + +n = length(ARGS) == 1 ? parse(Int, ARGS[1]) : 3 + +s = 0 +for x in range(1, stop = n) + for y in range(x + 1, stop = n) + global s + s += gcd(x, y) + end +end + +println(s) diff --git a/challenge-089/ash/julia/ch-1.julia b/challenge-089/ash/julia/ch-1.julia deleted file mode 100644 index 22f30004b4..0000000000 --- a/challenge-089/ash/julia/ch-1.julia +++ /dev/null @@ -1,15 +0,0 @@ -# To run: -# $ julia ch-1.julia 100 -# 13015 - -n = length(ARGS) == 1 ? parse(Int, ARGS[1]) : 3 - -s = 0 -for x in range(1, stop = n) - for y in range(x + 1, stop = n) - global s - s += gcd(x, y) - end -end - -println(s) diff --git a/challenge-089/ash/readme.md b/challenge-089/ash/readme.md index dd1b8fa592..b4cc9eb301 100644 --- a/challenge-089/ash/readme.md +++ b/challenge-089/ash/readme.md @@ -4,30 +4,30 @@ Implemenations of [Problem 1 of Week 89](https://perlweeklychallenge.org/blog/pe ## Using built-in or library functions for GCD -1. [Raku](ch-1.raku) -1. [Python](ch-1.py) -1. [C++ (C++17)](ch-1.cpp) -1. [Perl](ch-1.pl) -1. [Ruby](ch-1.rb) -1. [Scala](ch-1.scala) -1. [C#](ch-1.cs) -1. [Dart](ch-1.dart) -1. [Julia](ch-1.julia) -1. [D](ch1.d) -1. [Lisp (SBCL)](ch-1.lisp) +1. [Raku](raku/ch-1.raku) +1. [Python](python/ch-1.py) +1. [C++ (C++17)](cpp/ch-1.cpp) +1. [Perl](perl/ch-1.pl) +1. [Ruby](ruby/ch-1.rb) +1. [Scala](scala/ch-1.scala) +1. [C#](csharp/ch-1.cs) +1. [Dart](dart/ch-1.dart) +1. [Julia](julia/ch-1.jl) +1. [D](d/ch1.d) +1. [Lisp (SBCL)](lisp/ch-1.lisp) ## With a custom implementation of GCD -1. [C](ch-1.c) -1. [node.js (JavaScript)](ch-1.js) -1. [Java](ch-1.java) -1. [Rust](ch-1.rs) -1. [Pascal (FreePascal)](ch-1.pas) -1. [Go](ch-1.go) -1. [Lua](ch-1.lua) -1. [Fortran (Fortran 95)](ch-1.f95) -1. [PHP](ch-1.php) -1. [Kotlin](ch-1.kt) -1. [Bash](ch-1.bash) +1. [C](c/ch-1.c) +1. [node.js (JavaScript)](javascript/ch-1.js) +1. [Java](java/ch-1.java) +1. [Rust](rust/ch-1.rs) +1. [Pascal (FreePascal)](pascal/ch-1.pas) +1. [Go](go/ch-1.go) +1. [Lua](lua/ch-1.lua) +1. [Fortran (Fortran 95)](fortran/ch-1.f95) +1. [PHP](php/ch-1.php) +1. [Kotlin](kotlin/ch-1.kt) +1. [Bash](bash/ch-1.bash) Also read a [big article](index.md) about all the solutions and the task. -- cgit