Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my ($a,$b,$c);
- for($a = 3; $a < 31; $a++){
- ($a % 2 == 0) ? ($c = ($b = ($a ** 2 / 4) - 1) + 2) : ($c = ($b = ($a ** 2/2) - .5) + 1);
- if((my $num = ($a + $b + $c)) % 5 == 0){
- if((1000/$num) =~ /^\d+$/){ print ((${^MATCH} ** 3 * ($a*$b*$c)) . "\n"); exit;}
- }
- }
Add Comment
Please, Sign In to add comment