Skip to main content
deleted 73 characters in body
Source Link
Galen Ivanov
  • 21.6k
  • 3
  • 26
  • 62

J, 67,6 3 bytes

-1 byte thanks to FrownyFrog !

-3 bytes thanks to Grimmy!

*&<:*-<+

Try it online!Try it online!

     <:    decrease both arguments by 1
    &   -   and thensubtract
   *       multiply them
   +   the -sum of the subtractarguments
        <  1 (left argument is alway smaller then* the right one -> truefrom ->their 1)product

J, 6 bytes

-1 byte thanks to FrownyFrog !

*&<:-<

Try it online!

     <:    decrease both arguments by 1
    &      and then
   *       multiply them
       -   subtract
        <  1 (left argument is alway smaller then the right one -> true -> 1)

J, 7,6 3 bytes

-1 byte thanks to FrownyFrog !

-3 bytes thanks to Grimmy!

*-+

Try it online!

     -    subtract
      +   the sum of the arguments
    *     from their product
added 121 characters in body
Source Link
Galen Ivanov
  • 21.6k
  • 3
  • 26
  • 62

J, 76 bytes

-1 byte thanks to FrownyFrog !

_1+*&<*&<:-<

Try it online!Try it online!

     <:    decrease both arguments by 1
    &      and then
   *       multiply them
_1+       add-   subtract
        <  1 (left argument is alway smaller then the right one -> true -> 1)

J, 7 bytes

_1+*&<:

Try it online!

     <:   decrease both arguments by 1
    &     and then
   *      multiply them
_1+       add -1

J, 6 bytes

-1 byte thanks to FrownyFrog !

*&<:-<

Try it online!

     <:    decrease both arguments by 1
    &      and then
   *       multiply them
       -   subtract
        <  1 (left argument is alway smaller then the right one -> true -> 1)
Source Link
Galen Ivanov
  • 21.6k
  • 3
  • 26
  • 62

J, 7 bytes

_1+*&<:

Try it online!

     <:   decrease both arguments by 1
    &     and then
   *      multiply them
_1+       add -1