diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2022-01-18 19:44:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 19:44:20 +0000 |
| commit | 54f45ef81ba854637d1a8ca6199f0577e56a0859 (patch) | |
| tree | aa5e97322d6b45a9bebe0d7b478ed4df2446f2f7 | |
| parent | 2832ab5bb6f979a6ce8b37c47250721c648d6542 (diff) | |
| parent | 07a2a041710606e36a7c6eeb8e7f9bab66c07418 (diff) | |
| download | perlweeklychallenge-club-54f45ef81ba854637d1a8ca6199f0577e56a0859.tar.gz perlweeklychallenge-club-54f45ef81ba854637d1a8ca6199f0577e56a0859.tar.bz2 perlweeklychallenge-club-54f45ef81ba854637d1a8ca6199f0577e56a0859.zip | |
Merge pull request #5536 from codereport/master
Week 147 in BQN
| -rw-r--r-- | challenge-147/conor-hoekstra/bqn/ch-1.bqn | 5 | ||||
| -rw-r--r-- | challenge-147/conor-hoekstra/bqn/ch-2.bqn | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/challenge-147/conor-hoekstra/bqn/ch-1.bqn b/challenge-147/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..31f11f3496 --- /dev/null +++ b/challenge-147/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,5 @@ +# Eban Numbers +⥊0‿30‿40‿50‿60 +⌜ 2‿4‿6 + +# Output +⟨ 2 4 6 32 34 36 42 44 46 52 54 56 62 64 66 ⟩ diff --git a/challenge-147/conor-hoekstra/bqn/ch-2.bqn b/challenge-147/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..ba8c41a414 --- /dev/null +++ b/challenge-147/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,13 @@ +CubeRoot ← { + 𝕩<0 ? -3√-𝕩 ; 3√𝕩 +} + +IsCardano ← { + a‿b‿c ← 𝕩 + 1=a(++○CubeRoot-)b×√c +} + +IsCardano¨⊸/⥊1+↕45‿45‿45 + +# Output +⟨ ⟨ 2 1 5 ⟩ ⟨ 8 3 21 ⟩ ⟨ 11 4 29 ⟩ ⟨ 14 5 37 ⟩ ⟨ 44 45 13 ⟩ ⟩ |
