diff options
| author | Conor Hoekstra <codereport@outlook.com> | 2022-01-17 17:51:24 -0500 |
|---|---|---|
| committer | Conor Hoekstra <codereport@outlook.com> | 2022-01-17 17:51:24 -0500 |
| commit | 07a2a041710606e36a7c6eeb8e7f9bab66c07418 (patch) | |
| tree | a36c85a3f8c53d08ef195da9b288b9eed47f67bd | |
| parent | ee9f8c8288170dc442f8199fc1d2f7e45ac4377c (diff) | |
| download | perlweeklychallenge-club-07a2a041710606e36a7c6eeb8e7f9bab66c07418.tar.gz perlweeklychallenge-club-07a2a041710606e36a7c6eeb8e7f9bab66c07418.tar.bz2 perlweeklychallenge-club-07a2a041710606e36a7c6eeb8e7f9bab66c07418.zip | |
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 ⟩ ⟩ |
