LegionMammal978

Some golfs

Nov 28th, 2015
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 117 bytes: ReplacePart[t=Table[k Range@#,{k,#}],Join@@Cases[Table[t~Position~n,{n,Union@Flatten@t}],x_/;Length@x>1:>Rest@x]->0]&
  2. 108 bytes: ReplacePart[t=Table[k Range@#,{k,#}],Join@@Cases[t~Position~#&/@Union@Flatten@t,x_/;Length@x>1:>Rest@x]->0]&
  3. 102 bytes: ReplacePart[t=Table[k Range@#,{k,#}],Join@@Cases[t~Position~#&/@Union@Flatten@t,x:{_,__}:>Rest@x]->0]&
  4. 98 bytes: ReplacePart[t=Table[k Range@#,{k,#}],Join@@Cases[t~Position~#&/@Union@Flatten@t,{_,x__}->{x}]->0]&
RAW Paste Data