User:DanBron/Game of Nim: Difference between revisions
m
nowiki to make the page disappear from task space without changing the contents too much
m (Javascript) |
m (nowiki to make the page disappear from task space without changing the contents too much) |
||
(One intermediate revision by one other user not shown) | |||
Line 1:
<nowiki>
'''The suitability of this task for inclusion on Rosetta Code is being discussed on the talk page. This task may disappear in future.'''<br>
'''You are welcome to join in the discussion on the [[Talk:Game of Nim|talk page]].'''<br>
Line 60:
Ugly golf variant:
<lang Javascript>function m(a){x=0
l=a.length
r=[]
for(j=0;j<l;j++)x^=a[j]
for(j=0;j<l;j++)r[j]=Math.max(0,a[j]-(x^a[j]))
Line 249 ⟶ 251:
[[Category:Handicap]]
</nowiki>
|