• + 0 comments

    " //PANDEY JI

    class Result {

    public static String counterGame(long n) {
    // Write your code here
    int c=0;
    while(n!=1)
    {
        if((n&(n-1))==0)
        {
            n=n>>1;
        }
        else{
            n=n-Long.highestOneBit(n);
        }
        c++;
    }
    if(c%2==0){
       return "Richard";
    }
     return "Louise";
    }"