- 21.2k
- 3
- 18
- 44
Jelly, 14 bytes
DUz0«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs
A monadic link taking a list of two integers as its argument and returning an integer.
Explanation
D | Decimal digits
U | Reverse order of each set of digits
z0 | Transpose with 0 as filler
Ɗ€ | For each pair of digits, do the following as a monad:
« Ɗ | - Minimum of the two digits and the following as a monad (vectorises):
9_ | - 9 minus the digits
Ṛ | - Reverse the order
Ṁ | - Maximum
U | Reverse the order of the answer to restore the orignal order of digits
Ḍ | Convert back from decimal digits to integer
If a digit matrix is acceptable input/output:
Jelly, 12 bytes
Uz0«9_ṚƊṀƊ€U
Jelly, 14 bytes
DUz0«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 12 bytes
Uz0«9_ṚƊṀƊ€U
Jelly, 14 bytes
DUz0«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs
A monadic link taking a list of two integers as its argument and returning an integer.
Explanation
D | Decimal digits
U | Reverse order of each set of digits
z0 | Transpose with 0 as filler
Ɗ€ | For each pair of digits, do the following as a monad:
« Ɗ | - Minimum of the two digits and the following as a monad (vectorises):
9_ | - 9 minus the digits
Ṛ | - Reverse the order
Ṁ | - Maximum
U | Reverse the order of the answer to restore the orignal order of digits
Ḍ | Convert back from decimal digits to integer
If a digit matrix is acceptable input/output:
Jelly, 12 bytes
Uz0«9_ṚƊṀƊ€U
Jelly, 1314 bytes
DUZ«9_ṚƊṀƊ€UḌDUz0«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 1112 bytes
UZ«9_ṚƊṀƊ€UUz0«9_ṚƊṀƊ€U
Jelly, 13 bytes
DUZ«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 11 bytes
UZ«9_ṚƊṀƊ€U
Jelly, 14 bytes
DUz0«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 12 bytes
Uz0«9_ṚƊṀƊ€U
Jelly, 913 bytes
D9_Ṛ«Ʋ»/ḌDUZ«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 711 bytes
9_Ṛ«Ʋ»/UZ«9_ṚƊṀƊ€U
Jelly, 9 bytes
D9_Ṛ«Ʋ»/Ḍ
Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 7 bytes
9_Ṛ«Ʋ»/
Jelly, 13 bytes
DUZ«9_ṚƊṀƊ€UḌ
Grid of all single digit pairs
If a digit matrix is acceptable input/output:
Jelly, 11 bytes
UZ«9_ṚƊṀƊ€U