Activity for panadestein
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #293582 | Initial revision | — | about 2 months ago |
Answer | — |
A: Expand a polynomial [BQN], 15 bytes ⊢(«∘⊢-×)´˜1∾˜≠˜ A 3-train (fold with initial): we zero list of the same length as the input with a one appended (the base case), then for each root we do the multiplication by the variable (a shift), and the multiplication by the number. Coefficients in descending order B... (more) |
— | about 2 months ago |
Edit | Post #293578 | Initial revision | — | about 2 months ago |
Answer | — |
A: Find all unique quintuplets in an array that sum to a given target [BQN], 31 bytes {⍷(+´⊸=⟜𝕩∧5=≠)¨⊸/⥊(↕2¨𝕨)/¨<∧𝕨}´ This block function returns the empty array ⟨⟩ if the conditions cannot be satisfied. It works by sorting the input list to prevent having to filter additional combinations, then we generate the power set and filter the length 5 lists that sat... (more) |
— | about 2 months ago |
Edit | Post #293571 | Initial revision | — | about 2 months ago |
Answer | — |
A: Partial Sums of Harmonic Series [BQN], 23 bytes {𝕩{𝕊⍟(𝕗>·+´∘÷1+↕)𝕩+1}1} This recursion is more complicated than it should, but I managed to keep it purely functional. I use a modifier to mimic passing a left argument, that's why we have the 𝕗 inside the recursion test. [BQN], 17 bytes ⌊0.5+·⋆⊢-0.57722˙ I don'... (more) |
— | about 2 months ago |
Edit | Post #293567 | Initial revision | — | about 2 months ago |
Answer | — |
A: Display a Progress Bar [BQN], 32 bytes (']'∾˜''∾@+45+50↑79⥊˜·⌊×⟜50÷⊢)´ A tacit function. A pity, I had to add the parenthesis so I can fold the list of values that represent the fraction. Otherwise, assuming left and right argument like any BQN function, it would be 29 byes. I use BQN's character arithmetic to in... (more) |
— | about 2 months ago |
Edit | Post #293556 |
Post edited: |
— | about 2 months ago |
Edit | Post #293556 | Initial revision | — | about 2 months ago |
Answer | — |
A: Borromean coprimes [BQN], 27 bytes •math.GCD{∧´∘⥊(1=𝔽´)∧1<𝔽⌜˜} Booleans in BQN are the integers 0‿1. Try all test cases on the: BQN online REPL (more) |
— | about 2 months ago |