• + 0 comments

    Java

    public static long andProduct(long a, long b) {
    
      long result=a;
          for(long i=a+1;i<=b;i++){
              result=result & i;
          }
          return result;
    }