Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $\=$/;
- my @a=(1,2,3,4,6,8,9);
- for my $a (@a) {
- for my $b (@a) {
- next if $b <= $a;
- for my $c (@a) {
- next if $c <= $b;
- for my $d (@a) {
- next if $d <= $c;
- next unless sqrt($a*$b*$c*$d+1) == int sqrt($a*$b*$c*$d+1);
- print $a, v9, $b, v9, $c, v9, $d, v9, v9, int sqrt($a*$b*$c*$d+1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement