I'm a professional game developer from Wakefield, England, working as a senior programmer for Rebellion North.
I'm a married father of five and I a also sometimes do Retroburn stuff.
Martin 'Bytrix' Caine
Father. C++ Games Programmer. Cyclist. Guitarist.
emailfacebooktwittermessengersteamxboxliveretroburn
Tags
2013 3d alphalabs amazon apple archivirtual asynchronous battlefield bad company 2 ben 10 bepu beta blackmagic design blog blue marble bootcamp borderlands bsp calibration charity charvel childsplay comments competition content tracker counter-strike crash csgo css3 cycling dear esther deferred deus ex develop conference direct x discipline documentation doom 3 bfg dpi dr bott eidos elite force email deliverability eurogamer expo facebook focus fresnel game development game horizon game republic gamedev games gaming geoip girls make games global offensive grid guitar half-life 2 hawken hd7 hobbyist htc humble indie bundle imac indie indie trials indietrials intensity pro ip-countryside iron man 3 jamulus rift jquery kids kinect launch conference left 4 dead live lost mac mac osx manchester manhacks mass effect 2 matrox maya minecraft mirrors edge montreal morrowind movies museum of the microstar music mxo2 mini mysql nausea network networking nokia normal mapping obj oculus rift omnitrix ouya pedal for pounds php physics playstation suite port25 portal portal 2 positron posters powermta project aedra project euler promotion properties proton pulse ps vita ps4 psn racer reddit rendering retroburn game studios reviews rift racer riftracer roadkill roller coaster sdl2 shadow racers sharks shoct skyrifters snds space cadet spam trap star trek steam stencyl storage super stock sd1 fr superhot team fortress 2 tesselating tesselation texture editor thunderbird thunderclap ticktock games tiga track builder track bulder trials tv twitter uk ultimatrix usergroup vequencer video vireio visual assist visual studio vorpx voucher vr vr cinema war thunder warren web willow windows 8 windows 8.1 windows phone 7 workbench wp7 wp7dev xbla xblig xblig network xbox xbox live indie games xna xnaukug xperia play zombies on the holodeck
Archive
Links
Web
XNA
Games
Email Deliverability
Monday, May 31st 2010 / Web

Project Euler - Problem 8


<?
/******************************************************************
*  ProjectEuler.net  *  Problem 8  *  2010-05-31  *  Martin Caine *
******************************************************************/

$string  '73167176531330624919225119674426574742355349194934';
$string .= '96983520312774506326239578318016984801869478851843';
$string .= '85861560789112949495459501737958331952853208805511';
$string .= '12540698747158523863050715693290963295227443043557';
$string .= '66896648950445244523161731856403098711121722383113';
$string .= '62229893423380308135336276614282806444486645238749';
$string .= '30358907296290491560440772390713810515859307960866';
$string .= '70172427121883998797908792274921901699720888093776';
$string .= '65727333001053367881220235421809751254540594752243';
$string .= '52584907711670556013604839586446706324415722155397';
$string .= '53697817977846174064955149290862569321978468622482';
$string .= '83972241375657056057490261407972968652414535100474';
$string .= '82166370484403199890008895243450658541227588666881';
$string .= '16427171479924442928230863465674813919123162824586';
$string .= '17866458359124566529476545682848912883142607690042';
$string .= '24219022671055626321111109370544217506941658960408';
$string .= '07198403850962455444362981230987879927244284909188';
$string .= '84580156166097919133875499200524063689912560717606';
$string .= '05886116467109405077541002256983155200055935729725';
$string .= '71636269561882670428252483600823257530420752963450';

$max 0;

for( 
$i=0$i<996$i++ )
{
    
$sum intvalsubstr$string$i) ) *
                 
intvalsubstr$string$i+1) ) *
                 
intvalsubstr$string$i+2) ) *
                 
intvalsubstr$string$i+3) ) *
                 
intvalsubstr$string$i+4) );
    if( 
$sum $max )
    {
        
$max $sum;
    }    
}

echo 
$max;
?>



If you found this post helpful please leave a comment below:
 
Comments
Tags:   php   project euler   web
0