We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functioncounterGame(n){// Write your code here varturn=0while(n>1){n=Math.log2(n)%1==0?n/2:n-Math.pow(2,Math.floor(Math.log2(n)))turn++}returnturn%2==0?'Richard':'Louise'}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Counter game
You are viewing a single comment's thread. Return to all comments →
Javascript