Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 15th, 2012  |  syntax: PHP  |  size: 0.37 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. for($i=0;$i<1000000;++$i)
  3.         {
  4.         $str=str_shuffle('013456789');
  5.         if($str[0]!=='0'&&$str[2]!=='0')
  6.                 {
  7.                 $b=$str[0]*10+$str[1];
  8.                 $c=$str[2]*100+$str[3]*10+$str[4];
  9.                 $d=$str[5]*1000+$str[6]*100+$str[7]*10+$str[8];
  10.                 if(2*$b*$c===$d)
  11.                         file_put_contents('maths.txt',@file_get_contents('maths.txt').'2*'.$b.'*'.$c.'='.$d."\n");
  12.                 }
  13.         }
  14. header('refresh:1;url=?');die;