Project Euler #129: Repunit divisibility

  • + 0 comments

    PHP brute force:

    while (((pow(10,$k)-1)/9) % $n !== 0) {
        $k++;
    }
    

    Divide all the repunits until one works.