附件,16字节
&\S@{!S@_[0]Ø_}
在线尝试!
说明
&\S@{!S@_[0]Ø_}
{ } lambda (input: `_`)
_[0] first element of the given array
@ pass to:
! on each permutation:
S cast to string
Ø without any member of
_ the input
this gives all anagrams not in the input
@ then
&\S "first string element"
& spread input array over each individual arguments
\ tale first argument
S as a string
备择方案
17个字节:{&\S! !S@_[0]Ø_}
18个字节:{&\S! !Id@_[0]Ø_}
19个字节:{&\S!(!Id)@_[0]Ø_}
26个字节:{&\S!Permutations@_[0]Ø_}
26个字节:{&\S!Permutations[_@0]Ø_}
26个字节:{(Permutations[_@0]Ø_)@0}
26个字节:&\S##~`Ø#Permutations@&\S
27个字节:Last@{Permutations[_@0]Ø_}
27个字节:`@&0@{Permutations[_@0]Ø_}
28个字节:Last##~`Ø#Permutations@&{_}
28个字节:Last##~`Ø#Permutations@Last
28个字节:First@{Permutations[_@0]Ø_}
30个字节:{NestWhile[Shuffle,`in&_,_@0]}
33个字节:{If[(q.=Shuffle[_@0])in _,$@_,q]}
33个字节:{q.=Shuffle[_@0]If[q in _,$@_,q]}
34个字节:{If[Has[_,q.=Shuffle[_@0]],$@_,q]}
itertools
答案是吗?