Skip to main content
edited body; edited body
Source Link
Nick Kennedy
  • 21.2k
  • 3
  • 17
  • 43

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.

Explanation

ṚḌ;⁸Æd | Helper link: take an integer and return the count of divisors fof its reverse and the original number in that order

Ṛ      | Reverse
 Ḍ     | Convert back from decimal digits to integer
  ;⁸   | Concatenate to left argument
    Æd | Count divisors


Ç>/$Ɠ©#żÇ</$®#Ṫ | Main link

    Ɠ©          | Read and evaluate a line from stdin and copy to register
   $  #         | Find this many integers that meet the following criteria, starting at 0 and counting up
Ç               | Helper link
 >/             | Reduce using greater than (i.e. poor numbers)
       ż        | zip with
           $®#  | Find the aamesame number kfof integers meeting the following criteria
        Ç       | Helper link
         </     | Reduce using less than (i.e. rich numbers)
              Ṫ | Finally take the last pair of poor and rich numbers

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.

Explanation

ṚḌ;⁸Æd | Helper link: take an integer and return the count of divisors fof its reverse and the original number in that order

Ṛ      | Reverse
 Ḍ     | Convert back from decimal digits to integer
  ;⁸   | Concatenate to left argument
    Æd | Count divisors


Ç>/$Ɠ©#żÇ</$®#Ṫ | Main link

    Ɠ©          | Read and evaluate a line from stdin and copy to register
   $  #         | Find this many integers that meet the following criteria, starting at 0 and counting up
Ç               | Helper link
 >/             | Reduce using greater than (i.e. poor numbers)
       ż        | zip with
           $®#  | Find the aame number kf integers meeting the following criteria
        Ç       | Helper link
         </     | Reduce using less than (i.e. rich numbers)
              Ṫ | Finally take the last pair of poor and rich numbers

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.

Explanation

ṚḌ;⁸Æd | Helper link: take an integer and return the count of divisors fof its reverse and the original number in that order

Ṛ      | Reverse
 Ḍ     | Convert back from decimal digits to integer
  ;⁸   | Concatenate to left argument
    Æd | Count divisors


Ç>/$Ɠ©#żÇ</$®#Ṫ | Main link

    Ɠ©          | Read and evaluate a line from stdin and copy to register
   $  #         | Find this many integers that meet the following criteria, starting at 0 and counting up
Ç               | Helper link
 >/             | Reduce using greater than (i.e. poor numbers)
       ż        | zip with
           $®#  | Find the same number of integers meeting the following criteria
        Ç       | Helper link
         </     | Reduce using less than (i.e. rich numbers)
              Ṫ | Finally take the last pair of poor and rich numbers
added 931 characters in body
Source Link
Nick Kennedy
  • 21.2k
  • 3
  • 17
  • 43

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.

Explanation

ṚḌ;⁸Æd | Helper link: take an integer and return the count of divisors fof its reverse and the original number in that order

Ṛ      | Reverse
 Ḍ     | Convert back from decimal digits to integer
  ;⁸   | Concatenate to left argument
    Æd | Count divisors


Ç>/$Ɠ©#żÇ</$®#Ṫ | Main link

    Ɠ©          | Read and evaluate a line from stdin and copy to register
   $  #         | Find this many integers that meet the following criteria, starting at 0 and counting up
Ç               | Helper link
 >/             | Reduce using greater than (i.e. poor numbers)
       ż        | zip with
           $®#  | Find the aame number kf integers meeting the following criteria
        Ç       | Helper link
         </     | Reduce using less than (i.e. rich numbers)
              Ṫ | Finally take the last pair of poor and rich numbers

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.

Explanation

ṚḌ;⁸Æd | Helper link: take an integer and return the count of divisors fof its reverse and the original number in that order

Ṛ      | Reverse
 Ḍ     | Convert back from decimal digits to integer
  ;⁸   | Concatenate to left argument
    Æd | Count divisors


Ç>/$Ɠ©#żÇ</$®#Ṫ | Main link

    Ɠ©          | Read and evaluate a line from stdin and copy to register
   $  #         | Find this many integers that meet the following criteria, starting at 0 and counting up
Ç               | Helper link
 >/             | Reduce using greater than (i.e. poor numbers)
       ż        | zip with
           $®#  | Find the aame number kf integers meeting the following criteria
        Ç       | Helper link
         </     | Reduce using less than (i.e. rich numbers)
              Ṫ | Finally take the last pair of poor and rich numbers
Post Undeleted by Nick Kennedy
Post Deleted by Nick Kennedy
Source Link
Nick Kennedy
  • 21.2k
  • 3
  • 17
  • 43

Jelly, 22 bytes

ṚḌ;⁸Æd
Ç>/$Ɠ©#żÇ</$®#Ṫ

Try it online!

A full program taking 1-indexed \$n\$ on stdin and returning a list of the n-th poor and rich integers in that order.