Advertisement
Guest User

Untitled

a guest
Jul 7th, 2023
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.41 KB | None | 0 0
  1. $\=$/;
  2. my @a=(1,2,3,4,6,8,9);
  3. for my $a (@a) {
  4.     for my $b (@a) {
  5.         next if $b <= $a;
  6.         for my $c (@a) {
  7.             next if $c <= $b;
  8.             for my $d (@a) {
  9.                 next if $d <= $c;
  10.                 next unless sqrt($a*$b*$c*$d+1) == int sqrt($a*$b*$c*$d+1);
  11.                 print $a, v9, $b, v9, $c, v9, $d, v9, v9, int sqrt($a*$b*$c*$d+1);
  12.             }
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement