fork download
  1. <?if(!$i=fgets(STDIN))die('');parse_str($i,$i);$b=array('poke'=>1,'great'=>1.5,'ultra'=>2,'master'=>255,'safari'=>1.5,'sport'=>1.5,'lure'=>3,'net'=>3,'dusk'=>3.5,'dive'=>3.5,'moon'=>4,'fast'=>4,'quick'=>5,'love'=>8);$s=array('sleep'=>2.5,'frozen'=>2.5,'paralyzed'=>1.5,'poisoned'=>1.5,'burnt'=>1.5,''=>1);$i=array_merge(array('ball'=>'poke','hp'=>array('max'=>25,'current'=>1),'status'=>2.5,'rate'=>255),$i);$l='strtolower';$r='mt_rand';$x='*shake*'.PHP_EOL;$c='Click!'.PHP_EOL;$a=(((3*$i[hp][max])-(2*$i[hp][current]))*$i[rate]*$b[$l($i[ball])])/(3*$i[hp][max])*(is_numeric($i[status])?$i[status]:$s[$l($i[status])]);$a=((pow(65536/(255/$a),0.25)*4096)<<0)/4096;if($r(0,1)>$a)die();echo$x;if($a>1)die($c);if($r(0,1)>$a)die();echo$x,$x;if($r(0,1)>$a)die();echo$c;
Success #stdin #stdout #stderr 0.01s 20520KB
stdin
love
stdout
*shake*
Click!
stderr
PHP Notice:  Use of undefined constant hp - assumed 'hp' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant max - assumed 'max' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant hp - assumed 'hp' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant current - assumed 'current' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant rate - assumed 'rate' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant ball - assumed 'ball' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant hp - assumed 'hp' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant max - assumed 'max' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant status - assumed 'status' in /home/smvadT/prog.php on line 1
PHP Notice:  Use of undefined constant status - assumed 'status' in /home/smvadT/prog.php on line 1