Project Euler #53: Combinatoric selections

  • + 1 comment

    For a faster approach, notice that maximum input limit of k is 10^18. For n=1000, all r>7 exceeds kmax. From this we can conclude that we just need to find that r for which nCr exceeds k.