All pastes #385828 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-08 03:13 UTC
rendered paste body
<?php

for ($i = 0; $i < 99999; $i++) {
        $s = str_pad($i . '', 5, '0', STR_PAD_LEFT);
        $a = intval(substr($s, 0, 1));
        $b = intval(substr($s, 1, 1));
        $c = intval(substr($s, 2, 1));
        $d = intval(substr($s, 3, 1));
        $e = intval(substr($s, 4, 1));

        if (!($a == $b || $b == $c || $c == $d || $d == $e || $e == $a ||
            $a == $c || $c == $e || $e == $b || $b == $d || $d == $a)) {
                if ($a * 1000 + $b * 1000 + $c * 100 + $d * 10 + $e == ($e * 1000 + $d * 1000 + $c * 100 + $b * 10 + $a) * 4)
                        echo $s . "\n";
        }
}

?>