Report a wrong answer
Posted: Thu Dec 18, 2025 3:33 pm
hello
I think the answer for problem https://projecteuler.net/problem=12" is wrong.
if you solve the problem with this way:
solution 1
python
counter = 2
for i in range(2, int(n / 4) + 1):
counter += 2
The answer is different with:
solution 2
python
counter = 2
for i in range(2, int(n**0.5) + 1):
counter += 2
The obtained result (solution 1) differs from the accepted answer (solution 2).
The answer should be resulted from solution 1. because it's valid for all conditions and smaller than the accepted one(The problem wants the smallest one).
I think the answer for problem https://projecteuler.net/problem=12" is wrong.
if you solve the problem with this way:
solution 1
python
counter = 2
for i in range(2, int(n / 4) + 1):
counter += 2
The answer is different with:
solution 2
python
counter = 2
for i in range(2, int(n**0.5) + 1):
counter += 2
The obtained result (solution 1) differs from the accepted answer (solution 2).
The answer should be resulted from solution 1. because it's valid for all conditions and smaller than the accepted one(The problem wants the smallest one).