Sherlock and Queries

  • + 1 comment

    if j % B[i] == 0 then

    Shouldn't this be:

    if A[j] % B[i] == 0 then

    I get the expected output only when I make that change