Solve problem 9
This commit is contained in:
parent
32739f9edf
commit
bf5298b2d5
1 changed files with 2 additions and 0 deletions
|
@ -14,3 +14,5 @@
|
||||||
bits←{f←⍸∘⌽(2∘⊥⍣¯1)⋄∧/(f⍺)∊f⍵}
|
bits←{f←⍸∘⌽(2∘⊥⍣¯1)⋄∧/(f⍺)∊f⍵}
|
||||||
⍝ 8: Zigzag Numbers
|
⍝ 8: Zigzag Numbers
|
||||||
zigzag←∧/2=∘|2-/∘×2-/(10∘⊥⍣¯1)
|
zigzag←∧/2=∘|2-/∘×2-/(10∘⊥⍣¯1)
|
||||||
|
⍝ 9: Rise and Fall
|
||||||
|
risefall←{∧/(⍳∘≢≡⍋)¨(⊂((⊢⍳⌈/)↑⊢),⍵),⊂⌽((⊢⍳⌈/)↓⊢),⍵}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue