python,c++,algorithm,python-3.x,triangle-count
The issue is that the range for your c (C in python) variables do not match. To make them equivalent to your existing C++ range, you can change your python loop to: for C in range(int(math.floor(b/2)), int(math.floor(n/2))): ... To make them equivalent to your existing python range, you can change...