Skip to main content
Commonmark migration
Source Link

#PHP, 51 bytes

PHP, 51 bytes

while($d=$argv[++$i])$s+=$x=$d*$x>0?2*$x:$d;echo$s;

Run with -n or try it online.

#PHP, 51 bytes

while($d=$argv[++$i])$s+=$x=$d*$x>0?2*$x:$d;echo$s;

Run with -n or try it online.

PHP, 51 bytes

while($d=$argv[++$i])$s+=$x=$d*$x>0?2*$x:$d;echo$s;

Run with -n or try it online.

Source Link
Titus
  • 14.8k
  • 1
  • 24
  • 41

#PHP, 51 bytes

while($d=$argv[++$i])$s+=$x=$d*$x>0?2*$x:$d;echo$s;

Run with -n or try it online.