Skip to main content
ssssssssssssssss
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other rotationspermutations of the pair.
      P       # Multiply each rotationpermutation.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other rotations of the pair.
      P       # Multiply each rotation.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other permutations of the pair.
      P       # Multiply each permutation.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.
Clarification
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other rotations of the pair.
      P       # Multiply each pairrotation.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other rotations of the pair.
      P       # Multiply each pair.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other rotations of the pair.
      P       # Multiply each rotation.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.
Whoop
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24

05AB1E, 1111 9 bytes

Thanks to @ovs for -2!

ÝDâʒDPsnO+QÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!Try it online!

How?

You may count this as a port of thethe other answers, but I took a look only at the Husk answer before writing the program!

Ý              # Push a list of all numbernumbers from 0 to the input.
 D             # Duplicate the list.
  âã            # Push the cartesian productpower of both lists. (Basically, finding all possible pairs)
   ʒ           # For each pair...
    DP ãÀ¦        # Multiply the numbers.
      sn   Find all other rotations #of Squarethe thempair. (seperately)
       P O      # AddMultiply botheach squarespair.
        O +     # Add the sum of the squares and the productproducts.
          Q     # If the result is not equal to the input, yeet (throw) them from the list.
               # Automatically print the pairs not yeeted.

05AB1E, 11 bytes

ÝDâʒDPsnO+Q

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý              # Push a list of all number from 0 to the input.
 D             # Duplicate the list.
  â            # Push the cartesian product of both lists. (Basically, finding all possible pairs)
   ʒ           # For each pair...
    DP         # Multiply the numbers.
      sn       # Square them. (seperately)
        O      # Add both squares.
         +     # Add the sum of the squares and the product.
          Q    # If the result is not equal to the input, yeet (throw) them from the list.
               # Automatically print the pairs not yeeted.

05AB1E, 11 9 bytes

Thanks to @ovs for -2!

ÝãʒãÀ¦POQ

Oh my, I am getting in the hang of code golfing!

Prints a list of all the valid pairs (e.g [[1, 0], [0, 1]]). If there are none, the list is empty ([]). Also outputs both of any reverse integer pairs.

Try it online!

How?

You may count this as a port of the other answers, but I took a look only at the Husk answer before writing the program!

Ý             # Push a list of all numbers from 0 to the input.
 ã            # Push the cartesian power of lists. (Basically, finding all possible pairs)
  ʒ           # For each pair...
   ãÀ¦        # Find all other rotations of the pair.
      P       # Multiply each pair.
       O      # Add the products.
        Q     # If the result is not equal to the input, yeet (throw) them from the list.
              # Automatically print the pairs not yeeted.
time
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24
Loading
Priority to TIO
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24
Loading
Description
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24
Loading
Source Link
SunnyMoon
  • 2.7k
  • 13
  • 24
Loading