Project Euler #87: Prime power triples

  • + 0 comments

    Earlier I tried with bisect, ans += index + 1 and then break, but the issue here is with duplicates. It seems all solutions here are sort of brute force with sets to remove duplicates, and it is always ans += 1 in the counting itself. I wonder if there could be any dynamic programming involved in it.