メソッド化したやつはどっか行った、まあ分かるだろ

#!/usr/bin/perl

#use bigrat;

$be = 740303055;

$id = 0;
$calcd = 0;
$found = 0;

for ($y = 2; $y <= 9 && ! $found; $y++) {
for ($x = 2; $x <= 9 && ! $found; $x++) {
$calcd = (($be - $x * 10 - $y) / 100 + $x - $y - 5) / (3 * $x * $y);
$id = int $calcd;
print "$x $y $id $calcd \n";
if($calcd == $id){ $found = 1; }
}
}

print $id;