<?php declare(strict_types=1); function isPerfect($n) { return count($n)==4&&$n[0]*$n[1]*$n[2]*$n[3]+1==$n[0]**2+3*$n[0]+1**2; } var_dump(isPerfect(['a','b','c','d']));
You have javascript disabled. You will not be able to edit any code.