Data update
This commit is contained in:
parent
07c7092a52
commit
61b93a2cd1
313 changed files with 6160 additions and 346 deletions
20
Task/Hex-words/APL/hex-words.apl
Normal file
20
Task/Hex-words/APL/hex-words.apl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
∇HexWords;todec;digroot;displayrow;words;distinct4
|
||||
todec←16⊥9+'abcdef'∘⍳
|
||||
digroot←(+/10⊥⍣¯1⊢)⍣(10≥⊢)
|
||||
displayrow←{⍵ n (digroot⊢n←todec ⍵)}
|
||||
|
||||
words←((~∊)∘⎕TC⊆⊢)⊃⎕NGET'unixdict.txt'
|
||||
words←(words∧.∊¨⊂⊂'abcdef')/words
|
||||
words←(4≤≢¨words)/words
|
||||
words←words[⍋digroot∘todec¨words]
|
||||
|
||||
distinct4←(4≤≢∘∪¨words)/words
|
||||
distinct4←distinct4[⍒todec¨distinct4]
|
||||
|
||||
⎕←(⍕≢words),' hex words with at least 4 letters in unixdict.txt:'
|
||||
⎕←↑displayrow¨words
|
||||
⎕←''
|
||||
|
||||
⎕←(⍕≢distinct4),' hex words with at least 4 distinct letters:'
|
||||
⎕←↑displayrow¨distinct4
|
||||
∇
|
||||
Loading…
Add table
Add a link
Reference in a new issue