Last active
December 2, 2015 12:21
-
-
Save phroggyy/eb8b7b8a783abad07f16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $p=$r=0;foreach(file('i')as$g){$g=explode('x',$g);sort($g,1);$z=$g[0]*$g[1];$y=$g[0]+$g[1];$p+=2*$g[2]*$y+3*$z;$r+=$y*2+$z*$g[2];}echo"$p,$r"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment