<?php $a = [ -7, 1, 5, 2, -4, 2, 1 ]; for($i=count($a)-1,$c=0;$i+1&&$c!=(array_sum($a)-$a[$i])/2;$c+=$a[$i--]);echo $i;
You have javascript disabled. You will not be able to edit any code.