Problem 3583 · Medium

Count Special Triplets

For each middle value, count the values equal to twice it on the left and on the right, and multiply.

Open the interactive visualisation