text:
Count the Shantens
Introduction to Mahjong tiles
Mahjong (麻雀) is a board game that originates from China. Mahjong tiles used in this challenge are in Unicode points U+1F000 – U+1F021:

They are categorized as:

Winds (風牌): (East Wind), (South Wind), (West Wind), (North Wind)
Dragons (三元牌): (Red Dragon), (Green Dragon), (White Dragon)
Ten Thousands (萬子): (One of the Ten Thousands) through (Nine of the Ten Thousands)
Bamboos (索子): (One of the Bamboos; note that it depicts a bird) through (Nine of the Bamboos)
Circles (筒子): (One of the Circles) through (Nine of the Circles)
Winds and Dragons are together called Honors (字牌).
Ten Thousands, Bamboos and Circles are each called a suit and together called Numbers (数牌). They have ranks from 1 to 9.
Among Numbers, the Ones and the Nines are called Terminals (老頭牌). The Twos through the Eights are called Simples (中張牌).
Honors and Terminals are together called Orphans (幺九牌).

Every Mahjong tiles have 4 copies of themselves.
Mahjong Hand
A legal Hand consists of:

A Head (対子), which is 2 identical tiles.
4 Bodies (面子), each which is either:

A Sequence (順子), which is 3 consecutive Numbers with same suit.
A Triplet (刻子), which is 3 identical tiles.

Hence, a Hand consists of 14 tiles.
There are exceptional valid Hands. Seven Heads (七対子), which is 7 distinct Heads, and Thirteen Orphans (国士無双), which collects all 13 Orphans with an additional Orphan.
Tenpais and Shantens
13 Mahjong tiles will be given as the input. If an additional tile would make a valid Hand, this is called Tenpai (聽牌). Tenpai is zero Shantens.
If a tile must be exchanged to be Tenpai, this is 1-Shanten (1向聴).
If a tile must be exchanged to be 1-Shanten, this is 2-Shantens, and so on.
The objective is to output the number of Shantens.
Examples
 : Tenpai waiting for  or  to make a Sequence. An example of Two-sided Wait (兩面待機).
 : Tenpai waiting for  or  to make a Triplet. An example of Wait for a Triplet (双碰待機).
 : Tenpai waiting for  to make a Sequence. An example of One-sided Wait (邊張待機).
 : Tenpai waiting for  to make a Sequence. An example of Wait for the Middle (坎張待機).
 : Tenpai waiting for  to make a Head. An example of Wait for a Head (單騎待機).
 : Tenpai waiting for , , or . This example demonstrates how multiple ways of waiting can be combined.
 : Tenpai waiting for any of Ten Thousands. This is called Nine Gates (九蓮宝燈), and has the highest possible number of tiles to wait for to be a "normal" Hand.
 : Tenpai waiting for  to make a Head. An example of Seven Heads.
 : Tenpai waiting for . An example of Thirteen Orphans.
 : Tenpai waiting for any of Orphans. Another example of Thirteen Orphans.
 : 1-Shanten. Note that this is not Tenpai waiting for  because it would be a fifth .
 : 1-Shanten. Note that this is not Tenpai for Seven Heads because getting  will result in a duplicated Head.
 : 2-Shantens.
 : 6-Shantens. This is the highest possible number of Shantens.
You can demonstrate arbitrary examples here. (for 13 or 14 tiles)
Rules about code golf

Input type and format doesn't matter, but it must consist of the Unicode characters above. In C++, valid examples include std::u8string (sorted or not) , u32char_t[13], and std::multiset<u32char_t>.
Output type and format doesn't matter either.
Invalid input (not exactly 13 tiles, contains 5 copies of the same tile, contains a character not in U+1F000 – U+1F021, etc) falls into don't care situation.

@KevinCruijssen Thanks. Since I want to see how golfing languages handle Unicode, I removed that rule.

FYI: for some reason, the Mahjong tile characters are hard to read on (my version of) Firefox which alternates between small monochrome characters and larger color characters. Weirdly enough, the monochrome and color versions of the same character are both used depending on its position in the post. No problem on Chrome on the same laptop.

@Arnauld Really? I'm using Firefox on Ubuntu, and to me, only  is displayed as emoji, and all other tiles are displayed as monochrome characters. I'm afraid I don't know a solution.

It is quite painful to convert from Unicode to the mpsz notation used by the tool linked in the challenge, or the other way around. So ...

... here are two scripts to perform both conversions.

Also, I think we need more non-tenpai test cases, especially some tricky ones where it's not obvious to decide which groups should be removed or completed to get the optimal N-shantens.

Man, seeing this challenge brought me back to when I played some games for fun (no actual monetary stakes). I was a beginner and wanted to be super sure I would have the yaku needed to win with the hand I had, and somehow ended up on tenpai for a closed chin'itsu-tan'yao-ryanpeikou, which (if I won with it) has some ridiculous score value... I didn't win the round, but when I showed what I had after the game the table basically flipped out with how insane my hand was lmao

05AB1E, 80 77 73 72 77 74 bytes
₂Ý8+3ä€ü3€`4иML3δи©«4ã®€¦©âʒ˜D¢à5‹}®7.Æ«8L•1«þï•₆в«D¸â«ε˜•1óñ•+çJœIœδ.L}W<

-5 bytes thanks to @Grimmy, and also for teaching me about a hidden builtin
+5 bytes to fix two bugs
Brute-force approach that's extremely slow, so obviously no TIO with test cases.
Although TIO is too slow for the entire solution, I've added a TIO after each section so you can verify the individual parts work as intended. Note that the final TIO-link only uses a portion of each hand (including the input).
General explanation:

Generate a list of all valid 14-tile hands
Get every possible permutation of every 14-tile hand
Get the input-hand and get all its permutations as well
Get the Levenshtein distance between every input-hand permutation and every valid 14-tile hand permutation
Keep the lowest Levenshtein distance across all these checks, and decrease it by 1 to get the number of Shantens

Code explanation:
Create a list of all overlapping consecutive triplets of the Numbers:
₂Ý                # Push a list in the range [0,26]
  8+              # Add 8 to each to make the range [8,34]
    3ä            # Split it into 3 equal-sized parts: [[8,16],[17,25],[26,34]]
      €           # For each inner list:
       ü3         #  Create all overlapping triplets of this list
                  #   [a,b,c,d,e,...] → [[a,b,c],[b,c,d],[c,d,e],...]
         €`       # Then flatten one level down to have a list of triplets
           4и     # And repeat each consecutive triplet 4 times in the list

Try it online.
Create a list of all possible triplets of all tiles:
M                 # Push the largest value on the stack thus far (including inner lists),
                  # which is 34
 L                # Pop and push a list in the range [1,34]
   δ              # For each value in this list,
  3 и             #  Repeat it 3 times as list
     ©            # Store the list of identical triplets in variable `®` (without popping)

Try it online.
Then:
«                 # Merge the two lists together
 4ã               # And take the cartesian product of 4 with this list

Which results in all possible combinations of 4 Bodies: Try it online.
Then we'll generate all possible Heads:
®                 # Push the list of identical triplets from variable `®`
 €¦               # Remove one value from each so we have identical pairs (Heads) instead
   ©              # Store that as new variable `®` (without popping)

Try it online.
And create every possible combination of these 1 Heads + 4 Bodies:
â                 # By taking the cartesian product of the two lists
 ʒ      }         # And then filtering it so we won't use more than 4 of the same tile:
  ˜               #  Flatten the pairs/triplets to a single list
   D¢             #  Duplicate it, and count for each item how much it occurs
     à            #  Get the maximum for the tile that occurs the most
      5‹          #  And check that this it smaller than 5

Now we have all possible regular 14-tile hands: Try it online.
Next we'll also create the special type of 14-tile heads, starting with the 7
Heads:
®                 # Push the list of identical pairs (Heads) from variable `®` again
 7.Æ              # Get all 7-element combinations of these distinct heads
    «             # And merge it to the earlier created valid 14-tile hands

Try it online.
And the final valid 14-tile hands are the 13+1 Orphans:
8L                # Push a list in the range [1,8] (4 Winds, 3 Dragons, and One of the Ten Thousands)
  •1«þï•          # Push compressed integer 27700378
        ₆в        # Convert it to base-36 as list: [16,17,25,26,34] (Nine of the Ten Thousands,
                  #  One & Nine of the Bamboos, One & Nine of the Circles)
          «       # Merge those together
           D¸     # Duplicate this list of 13 Orphans, and wrap it into a list
             â    # And take the cartesian product of the two
              «   # And also merge those to the earlier created valid 14-tile hands

Try it online.
Now that we finally have all our valid 14-tile hands, we're going to get all their permutations as well as the permutations of the input, and check the Levenshtein-distance between each possible combination. After which the lowest Levenshtein-distance across all permutation-comparisons minus 1 is our number of Shatens:
ε                 # Map over each valid 14-tile hand:
 ˜                #  Flatten the pairs/triplets to a single 14-length list
  •1óñ•           #  Push compressed integer 126975
       +          #  Add it to each value in the list
        ç         #  Convert each from integer to their unicode character
         J        #  And join it together to a single string
          œ       #  Get all permutations of this hand
 Iœ               #  Then push the input, and get all its permutations as well
 δ                #  And then check for every possible combination of the permutations:
  .L              #   What the Levenshtein-distance is between the two

And finally get the (flattened) lowest one to calculate the number of Shantens:
}W                # After the map: push the flattened lowest Levenshtein-distance
  <               # And subtract it by 1 to get the number of Shantens
                  # (after which this is output implicitly as result)

Try it online with just a portion of the valid hands, each cut into a smaller hand, and with added debug-lines.
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand why •1«þï• is 27700378; •1«þï•₆в is [16,17,25,26,34]; and •1óñ• is 126975.
How slow?
To give you an idea of how slow this approach is, here are some numbers:
Regular hands: \$34×118^4-X\$

There are \$118\$ valid Bodies (including duplicated subsequent triplets for the Numbers, which each occur four time), and thus \$118^4\$ combinations of 4 Bodies (yes, this includes duplicated combinations due to the duplicated subsequent Number triplets).
There are \$34\$ valid Heads, and thus \$34×118^4\$ combinations of 1 Head + 4 Bodies.
After which \$X\$ (TODO: do the math..) combinations are removed, because they contain a certain tile more than four times.

Special hands: \$\binom{34}{7} + 13\$

There are again \$34\$ valid Heads, and thus \$\binom{34}{7}\$ combinations of 7 distinct Heads.
There are \$13\$ Orphans (\$4\$ Winds + \$3\$ Dragons + \$3\$ Ones + \$3\$ Nines), and thus \$13\$ valid Orphan hands.

There are therefore a total of \$34×118^4-X + \binom{34}{7} + 13 = 6597224013-X\$ valid 14-tile hands.
Comparing the input-hand and a single valid-hand: \$14!×13!\$

Getting all permutations of the 14-tile hands means there are \$14!\$ permutations.
Getting all permutations of the 13-tile input-hand means there are \$13!\$ permutations.
Checking each permutation of a valid 14-tile hand with each permutation of the input-hand are therefore \$14!×13! = 542861032610856960000\$ valid permutation-pairs.

So in conclusion:
Assuming a standard Levenshtein algorithm is used in the .L builtin, the complexity is in general about \$O(n^2)\$ (\$n\$ being the length of the string). Which in this case would be complexity \$O(14^2) = O(196)\$ for each of the \$14!×13! × (34×118^4-X + \binom{34}{7} + 13) = \$\$3581375840062321621020180480000 - 542861032610856960000×X\$ permutation-combinations across all valid hands (after which we still have to get the flattened \$minimum-1\$).
Safe to say: way too slow for a TIO link for even a single test case, let alone a test suite of all test cases. ;)

ü‚ü«€Ù is the built-in ü3: TIO.

@Grimmy Huh, since when is that a thing?! o.Ô

Probably since non-legacy 05AB1E. Also, that literal 34 can be M.

If anyone knows the math for the $X$, let me know.

Winning hands => permutations of each => drop last from each => levenshtein distance of each with the current hand would also work, saving a 13! execution time factor and probably a few bytes.

@Grimmy It would definitely increase the speed by a factor $13!$, but unfortunately no bytes (I think). The trailing œIœδ.L}W< I have now, would become œε¨I.L]W< in that case.


text:
Count switches in a smallest square root sequence mod \$2^n\$
Definition
For any \$a\equiv1\ (\text{mod }8)\$ and \$n\ge3\$, there are exactly 4 roots to the equation \$x^2\equiv a\ (\text{mod }2^n)\$. Now, let \$x_k(a)\$ be the smallest root to the equation \$x^2\equiv a\ (\text{mod }2^k)\$, then $$\{x_3(a),x_4(a),x_5(a),x_6(a),\cdots\}$$ is a smallest square root sequence (SSRS) of \$a\$ mod \$2^n\$.
John D. Cook published a quick algorithm that calculates such roots in \$O(n)\$ time. Assume \$x_k\$ is a root to the equation \$x^2\equiv a\ (\text{mod }2^k)\$. Then, $$x_{k+1}=\begin{cases}x_k&\text{if }\frac{x_k^2-a}{2^k}\text{ is even}\\x_k+2^{k-1}&\text{otherwise}\end{cases}$$
is a root to the equation \$x^2\equiv a\ (\text{mod }2^{k+1})\$.
Now we define two lists A and B. \$A=\{A_k|k\ge3\}\$ is the list of values generated by the algorithm above with initial values \$A_3=1\$ and \$B=\{B_k|k\ge3\}\$ is the list of values generated with initial values \$B_3=3\$. Each entry in the SSRS \$x_k(a)\$ takes the smallest value among \$A_k\$ and \$B_k\$. We say a switch in SSRS occurs whenever the choice changes from A to B or from B to A.
To illustrate the definition, take \$a=17\$:

The smallest numbers are highlighted. From the picture there are 13 switches up to mod \$2^{24}\$.
Challenge
Write a function or program, that receives 2 integers \$a,\ k\$ as input (where \$a\equiv1\ (\text{mod }8)\$ and \$k\ge3\$) and output how many switches occur in the SSRS of \$a\$ mod \$2^n\$ up to \$n=k\$.
Sample I/O
1, 3 -> 0
9, 4 -> 1
1, 8 -> 0
9, 16 -> 1
17, 24 -> 13
25, 32 -> 2
33, 40 -> 18
41, 48 -> 17
49, 56 -> 1
1048577, 2048 -> 959
1048585, 2048 -> 970

Winning Condition
This is a code-golf challenge, so shortest valid submission of each language wins. Standard loopholes are forbidden by default.

Getting 1048577, 2048 --> 959 with all the other test cases correct. Am I missing something?

Was this intended to be restricted-complexity? Otherwise we can just ignore Cook's formula and brute-force the square roots.

@Noodle9 It is 959 indeed! I have amended the test cases.

@Grimmy If bruteforcing gives the correct results I will accept it.

Oh I finally know why I put 1018 in the (1048577, 2048) case. It's actually the result of (17, 2048).

05AB1E, 15 14 bytes
LoεLnαy%0k}üÊO

Try it online!
For each n, this finds the smallest square root of a by brute-force.
05AB1E, 26 23 bytes (fast)
13v¹yλ£DnIαN>o%2÷+]@γg<

Try it online!
This one properly uses Cook's formula.
13                    # literal 13
  v               ]   # for each digit:
   ¹                  #  push the input k
    y             ]   #  push the digit
     λ£               #  recurse k times with base case y:
       Dn             #   square of the current value
         Iα           #   absolute difference with input a
           N>o%       #   modulo 2**(N+1)
               2÷     #   integer divide by 2
                 +    #   add to the current value
@                     # compare the two lists element-wise
 γ                    # group consecutive equal elements
  g                   # length
   <                  # -1

JavaScript (ES6),  88  87 bytes
Takes input as (a)(k).
Because of the bitwise operations, this is only guaranteed to work for \$k\le32\$.
a=>K=>(x=[p=1,3],F=k=>k<K&&(p^(x=x.map(v=>q=v+=(v*v-a>>k&1)<<k-1),p=x[0]<q))+F(k+1))(2)

Try it online!

Charcoal, 50 bytes
≔⁰ζ⊞υ¹⊞υ³ＦＸ²…³Ｎ«ＵＭυ⁺κ∧﹪÷⁻×κκηι²⊘ιＦ⌕υ⌊υ«≦⊕ζ≔⮌υυ»»Ｉζ

Try it online! Link is to verbose version of code. Takes input in the order \$ \small k, a \$. Explanation:
≔⁰ζ⊞υ¹⊞υ³

Start off with \$ \small 0 \$ swaps and initial values \$ \small A_3 = 1 \$ and \$ \small B_3 = 3 \$ in a list.
ＦＸ²…³Ｎ«

Loop over the powers of \$ \small 2^n \$ from \$ \small 2^3 \$ to \$ \small 2^{k-1} \$.
ＵＭυ⁺κ∧﹪÷⁻×κκηι²⊘ι

Map over the list calculating the next values \$ \small A_{n+1} \$ and \$ \small B_{n+1} \$.
Ｆ⌕υ⌊υ«

Test whether the smallest value is at the start of the list.
≦⊕ζ≔⮌υυ

If it isn't then increment the number of swaps and reverse the list so that the smallest value is at the start again.
»»Ｉζ

Print the number of swaps.
I have a 48 47 byte version that seems to work on the test cases but I don't know why.
≔⁰ζ≔¹δ≔⁰εＦＸ²…³Ｎ«≔﹪÷⁻Ｘδ²ηι²θ≧⁺¬⁼θεζ≔θε≧⁺∧ε⊘ιδ»Ｉζ

Try it online! Link is to verbose version of code. Explanation:
≔⁰ζ≔¹δ≔⁰ε

Start off with \$ \small 0 \$ swaps, \$ \small A_3 = 1 \$ and \$ \small A_3 < B_3 \$.
ＦＸ²…³Ｎ«

Loop over the powers of \$ \small 2^n \$ from \$ \small 2^3 \$ to \$ \small 2^{k-1} \$.
≔﹪÷⁻Ｘδ²ηι²θ

Work out whether \$ \small A_{n+1} > B_{n+1} \$.
≧⁺¬⁼θεζ

If this is a change from \$ \small A_n > B_n \$ then increment the number of swaps.
≔θε

Save this for the next loop.
≧⁺∧ε⊘ιδ

Add \$ \small 2^{n-1} \$ if \$ \small A_{n+1} > B_{n+1} \$.
»Ｉζ

Print the number of swaps.

Jelly, 31 29 bytes
²_⁴ọ2>
R1,3;€¹2*H+ʋ@ç?\€>/IAS

Try it online!
A full program taking \$n\$ as its left argument and \$k\$ as its right argument. Prints the number of switches.
Will post explanation once have more time to further optimise.

Python 3, 230 \$\cdots\$ 180 175 bytes
def f(x,a,k,p=4):
 l=[x]
 for n in range(3,k):x+=p*(((x*x-a)>>n)&1);p*=2;l+=[x]
 return l
def g(a,n):
 i=c=0
 for q in zip(f(1,a,n),f(3,a,n)):j=q[1-i]<q[i];c+=j;i^=j
 return c

Try it online!
A function g that uses Cook's formula (function f).

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Name an arbitrary string
This should be easy: given an arbitrary string, your program will give it a name.
Requirements
Your program will accept an input of a UTF8 string, and output a string representing the input's "name", how you define this name is arbitrary, but it must comply with some conditions.
I/O Ranges
The input will at most be 382 UTF 8 characters long (making the input space 1112064^382 long). Don't ask me why this number, it was random. Your program must support all of them. Consider not forcing you to deal with arbitrary input size an act of mercy.
You can use any character set to build your output space. ASCII, Unicode, only Wingdings characters, etc. all are fair game. This output space must be smaller than the input space (easy enough), and name collisions must be uniformly distributed (every name will refer to roughly the same number of input strings, ~1% fluctuation is the max. accepted difference).
Yes I'm asking you to build a watered down hash function. Just in case you're wondering.
Name collisions must be sufficiently rare that it does not happen in everyday use. 1 in \$2^{100}\$ sounds reasonable enough a limit. This forces your output space to be at least 7540 bits long (the input space is a little larger than \$2^{7640}\$). (I tried cheating my own challenge by only outputting 0 and 1, you are not allowed to cheat like I did).
Conditions

Name collisions must be rare enough (see above) and must not be, by any method, deliberately generated. This is similar to hash collisions.
Name space must be smaller that input space (whats the point of having a name longer than the string)
Your program must be deterministic. Same string must be assigned the same name every time.

Winning
The program with a name of at most 10 characters long and pronounceable (edit: since someone pointed out pronounceable is hard to define, this condition is now changed to <=10 characters of the same spoken language) wins. If this win condition is not met, scoring is lowest byte wins as usual.
The same language above means any one of the languages that people use. If one language uses some characters from another, that is fine as long as it is within normal use. (French uses English characters, for example) Mixing different language's characters that are not within formal use is not allowed (e.g. Korean characters and English alphabets)
Also give your program's name in the answer, even though it is unlikely to be <=10 characters and/or unpronounceable. I am curious what your program is called.

Intriguing idea, but I think it could benefit from some sandbox time. E.g. define "pronounceable". The special name-win condition is unnecessary and just pushes solutions to recognise themselves and return a short name.

For those who want to ask there is an objective and definite ruling of whether something is pronouncable. https://docs.microsoft.com/en-us/previous-versions/office/developer/speech-technologies/dd167863(v=office.14)

You didn't link to that 2) Even that page doesn't specify rules for this, so 3) One would have to do trial-and-error 4) It requires platform-specific software.

A "Coordinated Universal Time" string‽

Please define "characters of the same language".

05AB1E, 2 bytes
₂∍

Try it online!

Explanation
 ₂                - 26
  ∍               - Extend/shorten to this length

Extend will repeat the string until it is length 26, shorten will remove chars from the right until it is length 26.
This means that some strings will be slightly more likely (the repeated ones since ab, abab, ababab, ababababab etc all produce ababababababababababababab, but it will fall within the 1%, since these cases of collision only occur for strings below length 26.

05AB1E, 8 bytes (Winning)
HSAsèJ₆∍

Try it online!
Program's name: faegdahbbafaegdahbbafaegdahbbafaegda

Explanation
HSAsèJ          - Convert it to a string of the first 10 letters of the english alphabet
      ₆∍        - Extend shorten to base 36 (10^36 > 2^100)

Can definitely be shorter, but why bother. It wins.

Yeah but that's the same as any other substring amount @KevinCruijssen call it the base rate

Put it this way.. the worst case is a single repeated character, there are 26 + base amount that produce this. Since 26 is clearly less than 1% of the number of suffixes of length 356 it's within the 1%... @KevinCruijssen

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Self-loathing program/function
Simple task, write a program/function that returns error if and only if presented with itself.
The program must give a valid output for any input other than itself.
For the error part, you can only use errors already built in errors that comes with your language of choice. New/ self-defined error messages are not allowed.
The output should be of the same type as the input. (int, float, string, array, boolean, etc.) Except in the case if presented with itself of course.
Standard loopholes forbidden, lowest byte wins.

This seems to be, essentially the same as this, with the only exception being erroring instead of halting.

But it is different since invoking an error is required

Please avoid making assumptions about language features. Not al languages have built-in errors, not all can take inputs of variably type, etc.

Related/possible dupes: same challenge, but looping indefinitely if the input is anything other than itself and same challenge, outputting a truthy/falsey value depending on whether the input is equal to itself.

If a language doesnt contain errors than this challenge is obviously impossible in those language why ru even trying

05AB1E, 20 bytes
"34çìD«QiF"34çìD«QiF

Outputs the input if it's not equal to the program. If it is equal, it will output the error:

** (RuntimeError) Could not convert "34çìD«QiF"34çìD«QiF to integer.

Try it online.
Explanation:
It's based on this base quine: "34çìD«"34çìD«.
"34çìD«QiF"           # Push string "34çìD«QiF"
           34ç        # Push 34, converted to a character: '"'
              ì       # Prepend it to the string: '"34çìDJQiF'
               D«     # Append a copy of itself: '"34çìDJQiF"34çìDJQiF'
                 Qi   # If it's equal to the (implicit) input-string:
                   F  #  Start a loop, using the (implicit) input-string as argument,
                      #  resulting in the error
                      # (implicit else: use the implicit input as implicit output)


text:
Lonely Multiplication
Based on this question from Code Review.
Given precisely three positive integers, return the product of all of the distinct inputs. If none of the inputs are distinct, return 1. That is, implement the function:
\$ f(a,b,c) = \cases{1 & $a = b = c $ \\ a & $ b = c $ \\ b & $ a = c $ \\ c & $ a = b $ \\ a b c & otherwise } \$
Shortest code in each language wins.
Test cases
a, b, c -> f(a,b,c)
7, 7, 7 -> 1
3, 3, 5 -> 5
2, 6, 6 -> 2
3, 4, 3 -> 4
1, 2, 3 -> 6
12, 9, 16 -> 1728

05AB1E, 3 bytes
¢ÏP

Try it online!
¢       # count occurences of each number
 Ï      # keep only those where the count is 1
  P     # product (1 if the list is empty)

I had this exact solution prepared when I saw it in the Sandbox last week. Of course it had to go live yesterday evening, haha. ;) Obvious +1 from me.

C (gcc), 46 \$\cdots\$ 43 42 bytes
Saved 2 bytes thanks to 79037662!!!
f(a,b,c){a=a^b?a^c?b^c?a*b*c:a:b:b^c?c:1;}

Try it online!

I believe you can use a^c (bitwise xor) to check for equality which is shorter than c==a. Note that you'd have to flip the other parts of the ternary.

@79037662 Yes, I have thought of that but my head's still spinning from getting this to work! T_T

Here's a version for 45 bytes, I think it can be reduced further but I'm not sure. https://tio.run/##S9ZNT07@/z9NI1EnSSdZszrRNtHWNsk@ydY22d7QKtkKzEi0So5LtE/UStICCljX/s9NzMzT0KzmKijKzCtJ01BSTYnJU9JJ0zDXUQAhTU1rbFLGQIRNyhgsZYpNykhHwQyIcOgywWGgoY6CEVSq9j8A

@79037662 Nice one - thanks! :-)

42 bytes: https://tio.run/##S9ZNT07@/z9NI1EnSSdZszrRNjEuyT4xLtk@CYgTtZK0kq0SrZKsQLxkK0Pr2v@5iZl5GprVXAVFmXklaRpKqikxeUo6aRrmOgogpKlpjU3KGIiwSRmDpUyxSRnpKJgBEQ5dJjgMNNRRMIJK1f4HAA

@79037662 Well done - we got there! :-)

I have a n00b question. What's the "a=" doing there? It looks like it's a golf replacement for "return " but if so it's new to me. Thanks.

@AdamChalcraft gcc uses the same register for the first function parameter and the return value if they're both int. So yes, it's a golf hack to simply assign the return value to the first parameter.

JavaScript (ES6), 38 bytes
(a,b,c)=>a-b?b-c?c-a?a*b*c:b:a:b-c?c:1

Try it online!

JavaScript (ES6), 53 bytes
Takes input as [a,b,c].
A=>[[a,b,c]=A,1,a-b?a-c?a:b:c,a*b*c][new Set(A).size]

Try it online!
Commented
A =>                // A[] = input
  [                 // lookup table:
    [a, b, c] = A,  //   set size = 0 --> impossible, so use this slot
                    //   to split A[] into 3 distinct variables
    1,              //   set size = 1 --> return 1
    a - b ?         //   set size = 2 --> if a is not equal to b:
      a - c ?       //     if a is not equal to c:
        a           //       return a
      :             //     else:
        b           //       return b
    :               //   else:
      c,            //     return c
    a * b * c       //   set size = 3 --> return a * b * c
  ]                 //
  [new Set(A).size] // index into lookup table = size of the set

Thanks for including the second solution. It's way cooler than the fully golfed version.

For the case where two are the same, a^b^c gives the unique one. That saves 8 bytes in the second version.

J, 10 bytes
*/@-.}./.~

Try it online!
     }./.~  group by value and remove one from each group
   -.       set subtract from input
*/          product

This is quite nice

R, 40 37 bytes
-3 bytes by taking input with scan().
prod(unique(x<-scan())^2,1/x)^!!sd(x)

Try it online!
sd(x) computes the standard deviation (which is 0 iff all entries are equal), so !!sd(x) is TRUE if some entries are different, and FALSE if all are equal.

if all entries are different, then unique(x)==x, so we are down to prod(x)^1
if 2 entries are equal, then the corresponding value gets cancelled out between unique(x)^2 and 1/x, so we are left with the sole "lonely" value
if all 3 entries are equal, then we have (...)^0 which is 1.

This is shorter than anything I could come up with based on table, tabulate, duplicated or rle(sort()).

I had the obvious 47 bytes with duplicated; I did not even come close to this approach!

I think I've pipped you to 39 with rle(sort()), don't have the chance to fully bugtest it right now though. Apparently prod(numeric(0)) == 1 so it might be solid: Try it online!

@CriminallyVulgar The main reason for the difference is that you are using scan() to take input (which is surely fine). With scan(), my solution goes down to 37 bytes: Try it online!

@RobinRyder Ah, I made an error converting yours to scan(), mine is significantly longer with the function() format. Definitely a lot more tedious to test with scan(), I don't blame you for not using it originally.

@RobinRyder I was massively overcomplicating my indexing at the ends, so here's 36: Try it online!

@CriminallyVulgar Well done! Worth posting separately IMO.

APL (Dyalog), 10 bytes
Thanks to Adám and Bubbler in chat for helping golf this
×/∪*1=⊢∘≢⌸

Try it online!
Explanation:
×/             ⍝ Reduce by multiplication
  ∪            ⍝ The unique values of the input
   *           ⍝ To the power of
    1=         ⍝ Whether one is equal to
        ≢      ⍝ The length of
      ⊢∘ ⌸     ⍝ The indexes of each unique element

These days (18.0+), ×/∪*=Ö≢⌸ works.

Python, 48 bytes
lambda l:eval("(%sin[%s,%s]or %s)*"*3%(l*4)+"1")

Try it online!
Takes in a tuple. The idea is similar to an answer in the Code Review question, which can be golfed to:
51 bytes
lambda a,b,c:a**(b!=a!=c)*b**(c!=b!=a)*c**(a!=c!=b)

Try it online!
Each element is included in the product if it's different from the other two, with the power setting to a harmless x**0 == 1 otherwise. We want to avoid writing the three similar terms being multiplied. Python unfortunately doesn't have a built-in list product without imports. So, we turn to eval shenanigans.
We use a longer expression that use logical short-circuiting:
60 bytes
lambda a,b,c:(a in[b,c]or a)*(b in[c,a]or b)*(c in[a,b]or c)

Try it online!
In this expression, the variable names cycle through a,b,c in that order four times. So, by tripling the format string "(%sin[%s,%s]or %s)*" and plugging in the input tuple repeated four times, we get the desired expression. We just need to append a "1" to deal with the trailing multiplication.

Very nice! I only found the 51 :)

@FryAmTheEggman so this was it! I had the expression with the powers but I wasn't being able to write it in a short format!

PHP, 72 71 bytes
sort($argv);[,$a,$b,$c]=$argv;echo$a-$b?$b-$c?$a*$b*$c:$a:($b-$c?$c:1);

Try it online!
Might be shorter without the sort but nested ternary operator precedence blows my mind.
-1 byte thanks to @640KB
PHP, 66 bytes
fn($a,$b,$c)=>$a-$c?$a-$b?$b-$c?$a*$b*$c:$a:$b==$c?:$c:$b==$c?:$b;

Try it online!
Kudos to @640KB for taming the ternary operator beast!

Think you can -1 byte removing the $n= https://tio.run/##LcixCoAgEAbgl/kHDR2CXLTwQaLh7ojcFIte/4po@YavlaZzbq9n7ZcB9eO2aXUgB3aQbfkq7VIqyIMz2EMyaAAPkAiK5i@Jo02qGnTS8AA

And here's a ternary version without the sort()! https://tio.run/##Vc9Ba4MwFAfw8/Ip/pR3sOXVoqvtpks9DXYYrPe2lCSNyA4q09vYZ88S68CRR3j5Je8l6erOvZRd3QlBg@2HHhIn8XDCnsfAhQFsNlgfkAR/5BDZ3LPgKWPnY@7pdH7rS@a@DZ5wKPnnu9G9PjOSsdN07z59EpdC@CdW0lVNRIpJM5mlPJBakynDrEvS93xFekUmJ5WTltJTHlZ/qS6cb1W1X1aZOsL0a9X7DEt8C8CausVn3zZX25j2ZqNxi7E4D@dhwaAqQhzHdzy@Ha@vH@@F@BHOJX5kvw

I think the $b==$c can be reduced down to $b-$c by inverting the ternary truth/false parts. Not sure if my brain can handle it.

What happens with subtraction is that it changes the order of operations of the chained ternaries and you'd have to put parenthesis around it, so it actually adds one byte.

though it only works when you want to end with a  1. The subtraction is better for the upper leaves.

Jelly,  7  6 bytes
ḟœ-Q$P

Try it online!
How?
ḟœ-Q$P - list, L
    $  - last two links as a monad:
   Q   -   de-duplicate (L)
 œ-    -   (L) multi-set difference (that)
ḟ      - (L) filter discard if in (that)
     P - product

7s:
ĠṖÐḟị⁸P
ḟṖƙ`F$P

@FryAmTheEggman was it that?

Basically, just reordered: œ-QɓḟP

Excel (Version 1911), 80 Bytes, 42 Bytes
=PRODUCT(FILTER(A1#,COUNTIF(A1#,A1#)=1,1))

Input entered as a static column array (e.g. ={1;2;3}) in cell A1

Saved 38 bytes due to inspiration from Grimmy's 05AB1E solution.

How about =PRODUCT(IFERROR(UNIQUE(A1#,,1),1))?

Haskell, 37 bytes
f l=product[x|x<-l,filter(==x)l==[x]]

Try it online!
Pretty straightforward -- filter for elements that appear only once and take the product.

R, 36 bytes
prod((a=rle(sort(scan())))$v[a$l<2])

Try it online!
rle() shows its worth again. Feels like some parentheses could be golfed out somehow.
The fact that prod() of an empty numeric evaluates to 1 is the only reason this is efficient.

Python 3, 63 62 61bytes
lambda l:prod(x for x in l if l.count(x)<2)
from math import*

You can try it online!
Thanks @FryAmTheEggman for saving me 1 byte.

You can use <2 instead of ==1. I also recommend looking through the code review responses - some of them can make for good golfing! :)

@FryAmTheEggman thanks! Also, you think so? A first glance didn't show me anything very promising. Most answers used a LOT of if/else or imports...

I actually know there is something shorter :) Yours is different and works for any number of arguments, but you can save bytes by using that there are only 3 inputs! (Since it'll be totally different, if you find one I recommend posting another answer)

@FryAmTheEggman shaved 1 more byte but still not what you were talking about

GolfScript, 31 bytes
...{{*}*}:m;m\.|m/-m\.|,1=\1\if

This was... a lot more difficult than I thought it would be. Can be optimized. So much so, that I don't really want to give this much of an explanation.
Here's the process:
Take your input array and make 3 more copies of it. Make a function m, which multiplies the elements in an array together. Do that to the first array, then eliminate dupes from a second (keeping one of each). Perform m on it, then divide it from the first number. You should have the duplicate number (if there's only one pair dupe). Remove it rom your array, then return the last number. If the "suspected dupe" is 1, then just multiply again and output. If, when you remove all of the "suspected dupe"s, you're left with an array of size 1, just output 1 instead.
This was incredibly and probably needlessly complicated, but I couldn't find any good GolfScript shortcuts besides the multiplication bit. PITA.
Try it online, I guess

PowerShell, 44 bytes
,1+($args|group|? C* -eq 1|% N*)-join'*'|iex

Try it online!
where |? C* -eq 1 means |? Count -eq 1 and |% N* means |% Name.

PowerShell, 45 bytes
$p=1;$args|group|? C* -eq 1|%{$p*=$_.Name};$p

Try it online!

Ah, that's really clever. I was playing around with something similar, but couldn't get it functional.

Wolfram Language (Mathematica), 31 bytes
#&@@Times@@Tally@#~Cases~{_,1}&

Try it online!

#&@@ and {a_,1}->a use the same number of characters to take first but the rule has lower precedence than the infix operator.

Perl 6, 27 bytes
{[*] .Bag.grep(0=>1)>>.key}

Try it online!
(Using a Pair as matcher compares only values and ignores the key.)

PHP, 92 79 bytes
fn($a)=>array_product(array_keys(array_intersect(array_count_values($a),[1])));

Try it online!
This isn't going to win for brevity, but just thought I'd try it entirely using chained PHP array functions.
Now using @Guillermo Phillips's suggestion for PHP 7.4 arrow function syntax to save 13 bytes.
PHP, 66 bytes
fn($a,$b,$c)=>$a-$c?$a-$b?$b-$c?$a*$b*$c:$a:$b==$c?:$c:$b==$c?:$b;

Try it online!
And another crazy ternary version inspired by @Guillermo Phillips's answer!

It's a shame because the functions are powerful but verbose. Also, of course you can always use arrow functions: fn($a)=>..., but that's probably beside the point.

@GuillermoPhillips Yeah, they certainly weren't named for golfing.  array_count_values()?  Come on guys!  I've avoided the PHP 7.4+ short syntax, though I can't think of a good reason why... perhaps it's time.  It's a good suggestion because it actually will save a non-trivial number of bytes.

Burlesque, 24 bytes
psJ{{1j}qfcqpd}M-jNBL[!!

Try it online!
ps     # Parse to list
J      # Duplicate
{
 {1j}  # Push 1 & swap
 qfc   # Find least common element
 qpd   # Product
}M-    # Create array applying each function to make each element
       # {{Original list}, 1, least common, product}
jNB    # Remove duplicates from original list
L[     # Find length
!!     # Select that element from the array
       # (zero indexed, hence the push swap to fill zero)

Burlesque, 31 bytes
psJU_qpd{f:{-]1==}fe[~}IEisq1if

Try it online!
Can probably be golfed further.
ps      # Parse to array
JU_     # (Non-destructive) is each element unique?
qpd     # boxed product
{
 f:     # Frequency (returns {{count val} ...})
 {
  -]1== # Count == 1
 }
 fe     # Find element where
 [~     # Take the tail
}
IE      # If unique then product, else find single
is      # Is an error (i.e. single not found)
q1      # boxed 1
if      # If error, push 1

Mathematica, 40 bytes
f[l_]:=Times@@(If[Count[l,#]<2,#,1]&/@l)

You can try it online!

Bash + GNU utilities, 26
sort|uniq -u|dc -e1?*?*?*p

The 3 input integers are each given on their own line.
In the case of non-distinct inputs, dc warnings are printed to stderr.  These may be ignored.
uniq -u does most of the heavy lifting here.  With the -u option, only non-duplicated lines are returned.  uniq requires its input to be sorted.
The dc expression pushes 1 to the stack, then reads up to 3 integers, multiplying each in turn, then printing the output.  If uniq pipes less than 3 integers to dc, then the surplus ? will not add to the stack and the following * will spit out a warning because * needs to pop 2 operands from the stack.  But these are just warnings, dc continues execution until it prints the final product.
Try it online!

Python 2, 52 bytes
l=input();r=1
for x in l:r*=1%l.count(x)or x
print r

Try it online!

Ruby, 38 bytes
->*a{r=1;a.map{|w|(a-[w])[1]&&r*=w};r}

Try it online!

C#, 60 bytes
int f(int a,int b,int c)=>a==b?a==c?1:c:a==c?b:b==c?a:a*b*c;

Hi and welcome to code golf! I edited your submission to include the score, since we require that for all posts. I think you can save some bytes by removing some spaces. Good luck and I hope you enjoy your time here :)

TI BASIC, 45 Bytes
Prompt A,B,C
ABC
If A=B
C
If A=C
B
If B=C
A
If A=B and A=C
1
Ans

I'm not sure that A=sqrt(BC) is what you want...Suppose A=12, B=9, and C=16. Then A=sqrt(BC), but A!=B and A!=C.

Yeah that might not be as clean as hoped.  I think you can also do prod(A={B,C but that comes out to the same bytes as A=B and A=C

Brachylog, 6 bytes
≡ᵍ~gˢ×

Try it online!
 ᵍ        Group elements by
≡         value.
    ˢ     For each group,
  ~g      if it is a singleton list, extract its only element,
    ˢ     else discard it.
     ×    Take the product.

I'm curious about the "select" (meta?)predicate and your explanation. I am having trouble following as the explanation (and my brief glance at the documentation) makes it seem a bit like just a mapping. When/why does it discard results and what does ~g do for non-singleton lists?

@FryAmTheEggman The difference between xᵐ and xˢ (where x is any predicate) is that, if x fails on any element, xᵐ fails in its entirety, but xˢ discards any and all elements which fail instead. Failing is also what ~g does given a non-singleton list (g wraps its input into a singleton list, ~ inverts it). The utility of failure is backtracking to the most recent choice-point, and ˢ has one internally for that.

Factor + sets.extras math.unicode, 20 bytes
[ non-repeating Π ]

Try it online!
Factor has a word non-repeating that gives you every element of a sequence that doesn't repeat. Turns out the answer to this question is just taking the product of this.

MMIX, 48 bytes (12 instrs)
foo CMP $255,$0,$1
    CMP $3,$1,$2
    BZ  $255,0F     // if(a == b) goto ab
    BZ  $3,1F       // if(b == c) goto bc
    CMP $255,$0,$2
    BZ  $255,2F     // if(a == c) goto ac
    MUL $0,$0,$1    // a *= b
    MUL $0,$0,$2    // a *= c
1H  POP 1,0         // bc: return a
0H  CSZ $2,$3,1     // ab: if(b == c) c = 1
    POP 3,0         // return c
2H  POP 2,0         // ac: return b

Thunno 2, 4 bytes
cḅịp

Try it online!
Explanation
cḅịp  # Implicit input
c     # Counts of each number
  ị   # Only keep items of the input
 ḅ    # where the count equals 1
   p  # Product of this list

Perl 5 -MList::Util=product -apl, 45 44 bytes
@FryAmTheEggman saves a byte
$_=product(grep{$t=$_;2>grep$t==$_,@F}@F)||1

Try it online!

Japt, 9 6 bytes
ü l1 ×

Try it

PowerShell, 97 bytes
param($n)$a,$b,$c=$n|group;(($n-join'*'|iex),(($a,$b|?{$_.count-eq1}).name,1)[$a.count-eq3])[!$c]

Try it online!
Not terribly impressive, but given that PowerShell doesn't have a ternary operator like JavaScript, nor the same for structure as Python, I don't think this is too bad.
We take input $n as an array, then feed that into Group-Object, which stores the (potentially) three values into $a, $b, $c. Then we use array-indexing as a pseudo-ternary. We work "backwards" on the function definition given in the challenge, starting from the bottom. If we have a $c, then we have three unique values, so we -join $n with * and iex it (similar to eval). Otherwise, we have at least a duplicate, so we re-index whether $a's .count is -equal to 3. If it is, then all three values are the same, and we output 1. Otherwise, we pull out the lonely value (i.e., its .count is -equal to 1) and output its .name. In any case, the result is left on the pipeline and output is implicit.

Charcoal, 11 bytes
ＩΠＥθ⎇⊖№θι¹ι

Try it online! Link is to verbose version of code. Explanation:
   θ        Input array
  Ｅ         Map over elements
      №     Count of
        ι   Current element
       θ    In input array
     ⊖      Decremented
    ⎇       Ternary
          ι If count was 1 then original element
         ¹  Otherwise literal 1
 Π          Take the product
Ｉ           Cast to string for implicit print

I found other ways of formulating the condition, but they were all the same length. Alternate approach, also 11 bytes:
ＩΠ∨Φθ⁼¹№θι¹

Try it online! Link is to verbose version of code. Explanation:
    θ       Input array
   Φ        Filter where
       №    Count of
         ι  Current element
        θ   In input array
     ⁼      Equals
      ¹     Literal 1
  ∨         Or if list is now empty
          ¹ Then literal 1
 Π          Take the product
Ｉ           Cast to string for implicit print

Retina, 51 bytes
N`\d+
\b(\d+)(,\1)+\b

~["^.*¶$.("|""]'_L$`\d+
$&$*

Try it online! Link includes test cases. Explanation:
N`\d+

Sort the input list.
\b(\d+)(,\1)+\b

Delete all duplicated numbers.
L`\d+

List all the remaining numbers, discarding any commas.
$`
$&$*

Suffix each number with a *.
|""`

Don't separate the numbers.
["^.*¶$.("`

Prefix the result with ^.* on its own line and $.( on the same line as the numbers.
]'_`

Suffix the result with a _.
~`

Evaluate the result on the previous contents of the buffer. This results in one of three evaluations:

If all three numbers were identical, it evaluates this:
^.*
$.(_

If two numbers were identical, it evaluates this:
^.*
$.(5*_

If the numbers were distinct, it evaluates this:
^.*
$.(1*2*3*_

This takes the string _, and repeats it by the remaining numbers in turn, and then takes the length of the result, which is exactly the same as the product of the numbers, or 1 if there were none left.

Zsh, 39 bytes
(){i=1
for n;((i*=${(M)#@:#$n}>1?1:n))}

Try it online!
For the first time, I can say that a zsh math function actually won out over a normal program! I knew there was potential when I got a tie a while back, here's the relevant meta post if you want to know more about them.
The meat of this is the loop where we test for distinctness:
${(M)#@:#$n}
${   #     }    # count
${(M)      }    # matches
${    @:#  }    # on the positional parameters.
${       $n}    # against $n
            >1  # more than 1 (not distinct)

We use a ternary to decide to multiply by 1 or n.

Whitespace, 178 bytes
[S S S N
_Push_0][S N
S _Dupe_0][T    N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input_A][S N
S _Dupe_input_A][S N
S _Dupe_input_A][T  N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input_B][S N
S _Dupe_input_B][S N
S _Dupe_input_B][T  N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input_C][S N
S _Dupe_input_C][S T    S S T   S N
_Copy_0-based_2nd_input_B][T    S S T   _Subtract][N
T   S S N
_If_0_Jump_to_Label_C==B][S N
S _Dupe_input_C][S T    S S T   T   N
_Copy_0-based_3rd_input_A][T    S S T   _Subtract][N
T   S T N
_If_0_Jump_to_Label_C!=B&&C==A][S T S S T   S N
_Push_0-based_2nd_input_A][S T  S S T   S N
_Push_0-based_2nd_input_B][T    S S T   _Subtract][N
T   S N
_If_0_Jump_to_Label_PRINT][T    S S N
_Multiply][T    S S N
_Multiply][N
S N
N
_Jump_to_Label_PRINT][N
S S T   N
_Create_Label_C!=B&&C==A][S N
N
_Discard_input_C][N
S N
N
_Jump_to_Label_PRINT][N
S S S N
_Create_Label_C==B][S N
S _Dupe_input_C][S T    S S T   T   N
_Copy_0-based_3rd_input_A][T    S S T   _Subtract][N
T   S T T   N
_If_0_Jump_to_Label_C==B&&C==A][S N
N
_Discard_input_C][S N
N
_Discard_input_B][N
S N
N
_Jump_to_Label_PRINT][N
S S T   T   N
_Create_Label_C==B&&C==A][S S S T   N
_Push_1][N
S S N
_Create_Label_PRINT][T  N
S T _Print_as_integer]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Whitespace work-flow:
Integer A = STDIN as integer
Integer B = STDIN as integer
Integer C = STDIN as integer                   (the stack now contains [A,B,C])
If(C==B): Jump to Label C==B
If(C==A): Jump to Label C!=B&&C==A
If(A==B): Jump to Label PRINT                  (top of the stack is here C)
Multiply top two
Multiply top two
Jump to Label PRINT                            (top of the stack is here A*B*C)

Label C!=B&&C==A:
  Discard top (C)
  Jump to Label PRINT                          (top of the stack is here B)
Label C==B:
  If(C==A): Jump to Label C==B&&C==A
  Discard top (C)
  Discard top (B)
  Jump to Label PRINT                          (top of the stack is here A)

Label C==B&C==A
  Push 1                                       (top of the stack is here 1)
Label PRINT
  Print top of the stack as integer to STDOUT

Since the inputs are guaranteed to be positive, it uses heap-address 0 for input A; heap-address A for input B; and heap-address B for input C.

Kotlin, 52 51 43 bytes
filter{z->count{z==it}<2}.fold(1){s,c->s*c}

Try it online!

Not sure if defining the function in the header like I did is allowed, if it isn't i'll have to go back to the 51 byte answer

Stax, 11 bytes
äùóq◘0Jg•UÜ

Run and debug it
This one works for all testcases, and shorter! Uses Unrelated String's idea.
Explanation
o{}/{Dz_?m$:*
o             order the array
 {}/          group equal adjacent values
    {    m    map to the following:
        ?     if:
     D        deleting the first element
              makes the array empty, then:
       _       push it again
      z        otherwise push an empty list
          $   flatten the result
           :* take the product

Scala, 39 bytes
f=>f.filter(i=>f.count(_==i)<2).product

Try it online!

C (clang), 199 100 bytes
a,b;main(c){scanf("%i%i%i",&a,&b,&c);printf("%i",a-b|b-c?a-b|b==c?b-c|c==a?a-c|c==b?a*b*c:b:a:c:1);}

Try it online!
Don't know C? Here's how it works. We initialize 3 integers, give them input, then proceeds to multiple if-statements to check whether or not they're equal.
Thanks to ceilingcat for golfing a whopping 99 bytes.

Vyxal, 10 bytes
Ċ't1=;f1JΠ

Try it Online!

Pascal, 118 Bytes
This function uses the set-member-iteration statement (for … in … do) and the symmetric difference operator ><.
Therefore it needs a processor at least supporting features of ISO standard 10206 “Extended Pascal” (level 0).
function f(a,b,c:integer):integer;var r:integer;begin r:=1;if[a,b,c]<>[a]then for a in[a]><[b]><[c]do r:=r*a;f:=r end;

Ungolfed:
function f(a, b, c: integer): integer;
var
    result: integer;
begin
    { `result` needs to be initialized for the `for`-loop below. }
    result := 1;

    { If not sidelengths of an equilateral triangle: }
    if [a, b, c] <> [a] then
    begin
        { Symmetric difference of sets. }
        for a in [a] >< [b] >< [c] do
        begin
            result := result * a;
        end;
        { NB: The iterator variable `a` retains its original value
          unless you escape the `for`-statement with a `goto`. }
    end;

    { In Pascal there must be _exactly_ one assignment
      to the implicitly declared variable bearing the function’s name.
      Hence we cannot simply re-use `f` as the `result` variable. }
    f := result;
end;

I'm not the most familiar with Pascal, but I'm surprised that the initial if block is needed. If a=b=c then shouldn't the for loop be over an empty list leaving the result as 1?

@FryAmTheEggman There are three factors. Using mathematical notation, consider A = {7} = B = C (the first test case given in the task specification). The expression A △ B does indeed yield ∅ (empty set). However, after that ∅ △ C will then yield {7}. Hence you will need to guard the for … in‑loop.

Ah, thanks. I somewhat overthought it and clumped the two operations into one.

Racket, 74 bytes
λ(n)(apply *(map(λ(x)(if(=(length x)1)(car x)1))(group-by identity n))))

Try it online!

Excel, 60 bytes
=IF(A1=B1,IF(A1=C1,1,C1),IF(B1=C1,A1,IF(A1=C1,B1,A1*B1*C1)))

Does not use features like FILTER, only available to Office Insiders.

SQL, 245 155 bytes
 DECLARE @a INT=2,@b INT=4,@c INT=8;WITH v AS(SELECT x FROM(VALUES(@a),(@b),(@c))t(x) GROUP BY x HAVING COUNT(*)=1)SELECT ISNULL(EXP(SUM(LOG(x))), 1) FROM v

Expanded:
DECLARE @a INT=2,
        @b INT=4,
        @c INT=8;

WITH v
     AS (SELECT x
           FROM(VALUES(@a),
                      (@b),
                      (@c))t(x)
          GROUP BY x
         HAVING COUNT(*) = 1)
SELECT ISNULL(EXP(SUM(LOG(x))), 1)
  FROM v

The straightforward solution is only 150 .. but it is boring. :)
DECLARE @a INT=2,@b INT=4,@c INT=2;SELECT CASE WHEN @a=@b AND @a=@c THEN 1 WHEN @a=@b THEN @c WHEN @b=@c THEN @a WHEN @a=@c THEN @b ELSE @a*@b*@c END

DECLARE @a INT=2,
        @b INT=4,
        @c INT=2;

SELECT CASE
         WHEN @a = @b
              AND @a = @c THEN 1
         WHEN @a = @b THEN @c
         WHEN @b = @c THEN @a
         WHEN @a = @c THEN @b
         ELSE @a * @b * @c
       END

I'm not too familiar with SQL golfing, but the DECLARE statement seems out of place. I feel as though it either shouldn't be part of the answer, or what you've written isn't precisely reusable? I could easily be wrong - I'm just stating my current understanding.

Fair point - I am uncertain as well.. I can "assume" the @a, @b, and @c are the parameters passed into a function whose body is the SELECT statement, but is that correct? I could use some guidance there as well.

Stax, 13 bytes
üΩ1↑♂Åò←3♠'W▐

Run and debug it

Thanks for your post! Unfortunately this doesn't seem to meet the requirements for the case where two of the numbers are the same (i.e. for 5 5 7 this returns 35 when it should return 7). Since I don't understand Stax myself, it would also be great if you could include an explanation of what approach your code is using.

JavaScript (Node.js), 41 bytes
f=(a,b,c)=>a>f||f(b,c,[a])*(a-b&&a-c?a:1)

Try it online!
For shorter solution Arnauld has a 38 one

Uiua SBCS, 7 bytes
/×⊚=1°⊚

Try it!


text:
10-pin bowling split spare
Bowling
Bowling is a game where, essentially, each player gets 10 turns to:
Take 2 attempts at knocking down 10 pins arranged in a triangle.

between turns the pins are reset
from the 1st to the 2nd attempt the pins are left as-is

The arrangement of the pins resembles the following scheme, with the pins numbered 0-9:
6 7 8 9
 3 4 5
  1 2
   0

(Some rules and scoring mechanics omitted.)
Split spare
In bowling, a spare is when the player manages to knock down the pins that were left standing after a first attempt. A spare is said to be a split spare1 if the pins that were left standing are not adjacent.
E.g. if the pins are laid out as such:
. . 8 9
 . . .
  . 2
   .

Then a player who manages to knock down all these 3 pins would score a split spare, given that the pin 2 is not adjacent to the 8, 9 group.
(1 for the purposes of this challenge, a split spare is defined taking into account only the adjacency of the pins left standing, even though Wikipedia's link states that for a split spare to take place, the pin 0 must have been knocked down already)
Your task
Given the numbers of the pins left standing, output a Truthy value if such an arrangement would give a split spare and Falsy otherwise.
Input
The list of all pins left standing (at least 2), in any reasonable format. Pin numbering may be 0- or 1-indexed provided it follows the numbering direction shown above. Sensible input formats include:

a list of integers, like [2, 8, 9]
a string of integers, like "289"
separate arguments to a function
an integer whose bits correspond to the pints left standing and whose least significant bit corresponds to pin 0, e.g. 0b1100000100 for pins 2, 8 and 9.

You may assume input is sorted, if that helps you in any way.
Output
A single consistent value for Falsy test cases and anything else for Truthy test cases.
Test cases
Truthy
[0, 9]
[2, 8, 9]
[1, 5, 8]
[3, 5]
[3, 8]
[3, 9]
[6, 8]
[6, 9]
[3, 5, 8, 9]
[5, 6]
[0, 1, 5, 6, 7, 9]
[1, 2, 8, 9]

Falsy
[1, 2]
[7, 8, 9]
[1, 2, 5]
[2, 4]
[0, 1, 3, 6]
[2, 5, 9]
[6, 7]
[4, 7]
[4, 8]
[1, 4, 5, 7]

Bonus imaginary internet points
Bonus imaginary internet points if your algorithm works for any triangle number of pins, instead of just 10.
So far, only Grimmy's 05AB1E answer qualifies for the bonus internet points!

Standard loopholes are forbidden by default.
This is code-golf so shortest solution wins! If you enjoy the challenge, consider upvoting it... And happy golfing!

Somewhat related: Draw a bowling formation

Can we assume at least 2 pins?

May we take the input as a single 10-bit integer?

A single consistent value for Falsy test cases and anything else for Truthy test cases. It seems like we have almost as many output rules as we have decision-problem challenges. :-/

@Noodle9 yes, the pin 2 was misplaced. Yes, [1, 2, 8, 9] is a split spare and for the challenge, for a spare to be a split spare we only care about adjacency. We don't care about the headpin.

@Arnauld yes you can take input as a 10 bit integer, where the set bits correspond to the pins that are standing, much like the input list has the indices of the pins left. Also, about the output rules: I thought this made sense! I fail to understand your objection :/

@RGS My initial version was outputting either false (Boolean value) or 0 (integer) for the falsy output. I had to fix it to always output false.

A shame we couldn't make it a code-bowling contest somehow!

According to the linked page we only have a split if the head pin (0 here) has been knocked down, which would move a couple of the truthy tests to falsey ones - these would instead be "washouts".

@JonathanAllan thanks for pointing the inconsistency out. I will edit the question to state clearly that we only care about adjacency for our definition of split spare.

@JDL we'll come up with something!

Would he following input array be considered acceptable? For pins 2, 5, 6 being stuck up, [[0],[0,1],[0,0,1],[1,0,0,0]], split by rows, left-to-right?

@Mathgeek The format [[0], [0, 1], [0, 0, 1], [1, 0, 0, 0]] is acceptable, yes.

05AB1E, 27 25 24 23 bytes
ÅTαε.āθDÆª}©æε®yKδαOß}à

Try it online!
Outputs 2 for falsy and a larger integer for truthy. Works for any triangle number of pins, thus qualifying for the bonus internet points.
A set of pins is split if and only if there is a partition of the set of pins in two subsets A and B such that no pin in A is adjacent to a pin in B.
Adjacency is determined using 3-element hexagonal coordinates.
First, we convert the input pins to their hex coordinate triplets:
   ε      }     # for each pin in the input:
ÅT              #  list of triangle numbers <= pin
  α             #  absolute difference of each one with pin
    .ā          #  enumerate: [a, b, c] => [[a, 1], [b, 2], [c, 3]]
      θ         #  get the last pair
       D        #  duplicate
        Æ       #  reduce the copy by subtraction
         ª      #  append that to the pair

Then, we iterate over partitions of this set of triplets in two subsets:
©               # save the set in the register
 æ              # powerset (list of subsets)
  ε       }     # for each subset y:
   ®            #  push the set from the register
    y           #  push y
     K          #  set difference (=> y's complement)

Then, we compute the 2D list of distances between each pin in the first subset and each pin in the second subset. Thanks to the elegance of 3-element hexagonal coordinates, this is surprisingly easy:
      δα        #  double vectorized absolute difference
        O       #  sum each triplet

Finally, we answer the question:
         ß      #  minimum distance for the current partition
          }     #  end the loop
           à    # maximum of the list of minimums

Good job on winning the bonus internet points! Can you explain how you did it?

@RGS explanation added, also i golfed 3 more bytes.

Ruby, 72... 74 bytes
->l{*r=l[0];l.map{r.map{|w|r|=l&"zê-ǓᔂYMŰɃc"[w].ord.digits}};l&r!=l}

Try it online!
What is that?
Starting from the first pin in the list, check if all pins can be reached within a finite number of steps.
The binary string "zê-ǓᔂYMŰɃc" is the UTF-8 encoding of the adjacency list [122,234,45,467,5378,89,77,368,579,99]. Some digits are repeated to make the numbers fit into the ASCII range and spare some bytes, some edges are omitted if the node can be reached through different paths.
Thanks Value Ink for smoothing out rough edges (-3 bytes).

I have very high expectations for your corrected version :)

The main optimization that comes to mind is *r=l[0]. Also, it seems you only need to take "steps" up to the number of pins remaining, so l.map{r.map{ works too (at least for the existing test cases)

JavaScript (ES6),  87  83 bytes
Saved 4 bytes thanks to @Grimmy
Takes input as a 10-bit integer (LSB = pin \$0\$, MSB = pin \$9\$). Returns a non-zero integer for a split spare, or \$0\$ otherwise.
n=>(g=m=>[6,29,51,210,430,788,136,344,688].map((v,i)=>m|=m>>i&1&&n&v)|m)(g(n&-n))^n

Try it online!
How?
Starting with the lowest bit set in the input, we progressively expand a bitmask with the pin neighbors. We eventually compare the result with the input.
Because we expand from pin \$0\$ to pin \$9\$ (let's call them \$P_0\$ to \$P_9\$), a single pass would occasionally miss a connection. Fortunately, processing two passes is always enough for all possible paths, which is what this code is doing.
For instance, let's consider the following configuration:
6 - - -
 3 4 -
  - 2
   -

First pass
We start with \$P_2\$, which expands to \$P_4\$. Then, \$P_4\$ expands to \$P_3\$. The connection between \$P_3\$ and \$P_6\$ is missed because \$P_3\$ is not included in the bitmask at the time it's processed.
Second pass
Again, we start with \$P_2\$, which expands to \$P_4\$ (no change). Then, \$P_3\$ expands to \$P_4\$ (no change) and \$P_6\$, which completes the bitmask.
Improvement
As pointed out by @Grimmy, we never need to expand from \$P_9\$: when we reach it, its neighbors (\$P_5\$ and \$P_8\$) have necessarily been found already. Therefore, we can safely discard its neighbor bitmask and iterate only from \$P_0\$ to \$P_8\$.
Commented
n => (                // n = input bitmask
  g = m =>            // g is a recursive function taking a mask m
    [                 //   lookup table:
             6,       //     neighbors of pin 0
           29,51,     //     neighbors of pins 1, 2
        210,430,788,  //     neighbors of pins 3, 4, 5
      136,344,688     //     neighbors of pins 6, 7, 8
    ]                 //
    .map((v, i) =>    //   for each value v at position i in the above array:
      m |=            //     update m:
        m >> i & 1 && //       if the i-th bit is set in m:
        n & v         //         m = m OR (n AND v)
    ) | m             //   end of map(); return the new value of m
)(                    // invoke g twice to support the longer paths,
  g(n & -n)           // starting with the lowest bit set in n
) ^ n                 // compare the result with n

+1 for the solution using bitwise operations

You can drop ,288 from the array: if we start with bit 9, that means it's the only bit set, so it's neighbors are irrelevant; otherwise, we can only reach 9 through 5 or 8, and they are adjacent to each other, so we don't need 9 to make the connection.

@Grimmy Very nice catch. :) (PS: the input is guaranteed to include at least 2 pins, so we don't even have to worry about the 'pin 9 alone' case.)

Python 3.8 (pre-release), 106 121 bytes
Defines a function P.__contains__ that takes a set of pins and returns False for a split spare or True otherwise.
e.g. P.__contains__({"0", "9"}) returns False while P.__contains__({"0", "1"}) returns True
d="6310214374254859876"
P={*map(frozenset,zip(d,d[1:]))}
while P<(P:={a|b for a in P for b in P if a&b}):0
P.__contains__

Try it online!

+1 for a nice python solution :)

Wouldn't P.__contains__ have to actually count towards you byte count?

@mypetlion looked around meta a bit and the general consensus seems to be that it does count towards your byte count. Updated.

C++ (gcc), 381 \$\cdots\$ 267 248 bytes
#import<set>
using S=std::set<long>;int f(S s){std::set<S>c;for(long b=0x5792628a5a065664;b>9;b/=10)c.insert({b%10,b/10%10});for(S i:c)for(S j:c){S q(i);q.insert(begin(j),end(j));if(q.size()<i.size()+j.size())c.insert(q);}return c.find(s)==end(c);}

Try it online!
Ungolfed
#include<set>
#include<algorithm>
using namespace std;
using S=set<int>;
bool f(S s) {
    // Change array a for any number or shape of pins,
    //  instead of just a triangle of 10.
    // It lists all the pins next to all their adjacent pins.
    int a[]{6,3,1,0,2,1,4,3,7,4,2,5,4,8,5,9,8,7,6};
    set<S> c;
    for(int i=0;i<sizeof(a)/sizeof(int)-1;++i)
        c.insert({a[i], a[i+1]});
    set<S> t;
    // Keep on adding connected sets of pins until there are no more new ones.
    while (t!=c) {
        for (auto i:c)
            for (auto j:c)
                if (any_of(begin(i),end(i),
                   [&](auto e){return j.find(e)!=end(j);}))
                {
                    S q(i);
                    q.insert(begin(j),end(j));
                    t.insert(q);
                }
        swap(t,c);
    }
    return c.find(s)==end(c);
}

Builds a set of all connected pin sets as per Kyle Gullion's idea and then simply tests for membership.

I'm having trouble with the TIO link, is it from my phone?

Ah I see! +1 for your submission, even though you are currently losing :'(

@RGS I'm still golfing it, you just wait and see! T_T

@RGS Check it out now, runs fine on TIO with optimisation cranked! :-)

Really cool! Thanks for the effort :D

Doesn't need optimisation to run smoothly on TIO anymore.

Charcoal, 47 bytes
ＵＯ⁸#Ｆθ«≔⌊⊘⊖₂⊕×⁸ιηＪ⁺³⁻⊗ι×η⁺²η⊗ηＵＯ²ψ»¤#≔›⁶⁴ＬＫＡη⎚η

Try it online! Link is to verbose version of code. Takes input as an array of integers and outputs a Charcoal boolean, - for a split spare, empty output otherwise. Explanation:
ＵＯ⁸#

Draw an 8-by-8 rectangle of #s.
Ｆθ«

Loop over the input pins.
≔⌊⊘⊖₂⊕×⁸ιη

Calculate the row of the pin.
Ｊ⁺³⁻⊗ι×η⁺²η⊗η

Jump to the position of the pin.
ＵＯ²ψ

Erase a 2-by-2 rectangle representing the pin.
»¤#

Fill with #s starting at the last pin.
≔›⁶⁴ＬＫＡη

See whether the fill restored all 64 #s.
⎚η

Clear the canvas and output the result.
Although I calculate the position of the pin directly (I tried a look-up table but it was the same byte count) this method won't handle arbitrary numbers of pins since it needs to be able to draw a large enough initial rectangle. However it can be adjusted to handle a specific maximum number of pins: the initial 8 needs to be increased by 2 for each additional row of pins, the 3 needs to be one less than the new number of rows of pins, and the 64 needs to be the square of the number that replaces 8.

Nice submission! You don't qualify for the bonus imaginary internet points, unfortunately :(

@RGS Right, the bonus points aren't worth the extra byte count.

No problem, the bonus points are just imaginary

Excel (Ver. 1911), 142 Bytes
A1     'Input
B1:B10 3ÒƮ̔ŘʰĠ 'one character per row
       ^^^ (Non-printing characters)
C1     =ROW(B1:B10)-1
D1     =BITAND(INT(A1/2^C1#),1)*UNICODE(B1:B10)
E1     =SUM(MMULT(N(BITAND(2^C1#,TRANSPOSE(D1#))*D1#>0),N(C1#>=0)))+2<2*SUM(N(D1#>0)) 'Output

Here un-golfed using named ranges and extra columns
Input         'Input
Bit_List      3ÒƮ̔ŘʰĠ 'as a column of chars
Pin_Num       =SEQUENCE(ROWS(Bit_List))-1
Unicode       =UNICODE(Bit_List)
Pins_Left     =BITAND(INT(Input/2^Pin_Num),1)*Unicode
Pins_Adjacent =MMULT(SIGN(BITAND(2^Pin_Num,TRANSPOSE(Pins_Left))*Pins_Left),SIGN(Pin_Num+1))
Split         =SUM(Pins_Adjacent)<2*(SUM(SIGN(Pins_Left))-1)

Try it offline! (link to the workbook in a google drive)
You'll need to download and open in the latest version of excel for the formulas to work.
Single Test+Comments screenshot

+1 incredible work on this!


text:
Combinations of stepwise increasing integers
Working on something in probability theory, I stumbled across another combinatorical exercise. These are always fun to solve, searching for intelligent approaches. Of course, one can use brute force for the following task, but this challenge is restricted complexity, so this is not allowed.
Task
Given an integer Input \$n > 1\$, print all integer vectors of length \$n\$, respecting following conditions:

\$v_1 = 1\$
\$v_{i+1} - v_i \in \{0,1\}\$
\$v_n \neq n\$

example:
Input:
n=4
Output:
[1 1 1 1]

[1 1 1 2]

[1 1 2 2]

[1 1 2 3]

[1 2 2 2]

[1 2 2 3]

[1 2 3 3]

Additionally, time complexity of your solution must be \$O(2^n)\$. Note that generating all vectors and then filtering would be \$O(n^n)\$, which is not acceptable. A direct construction, not generating any false vector or duplicate vector at all, seems to be a bit more of a challenge.
Having said that, shortest code in bytes, respecting the above condition, wins.

Would it be correct to assume [1 2 3 4] would also be a valid output for your example, meaning there would be 2^(n-1) total outputs?

@Mathgeek It says containing integers < n, so I assumed you have to exclude that vector.

Indeed, I would edit the question and shift that part to the conditions list, but it seems i'm not allowed to.

So it just means we have to pop the [1, 2, 3, 4... n] vector. Extra restriction never hurt anybody!

@Neil so this is essentially what mathgeek was saying, except we have $2^{n-1}-1$

brute force (…) wouldn't fulfill winning criteria. contradicts [tag:code-golf].

@Adám Is there a standard way to ban brute force answers?  [tag:restricted-complexity] ?

@Anush Say: solutions must terminate within X Ys on Z and supply a test case that can't be brute forced within those constraints.

@Adám But then you have to test all the code on your own PC?

@Anush Usually people will link to TIO or similar, and it'll fail on big cases.

@Adám OK I am happy with that. People also complain that the timing on TIO is unreliable and so shouldn't be used for anything related to time constraints. But I don't agree.

@Anush While it is very imprecise, it won't usually fluctuate by a factor of 10…

Welcome to the site.  I am voting to close this as unclear.  This is because a blanket ban on "brute force" answers is not objective.  There is a ton of grey area as to what counts as "direct construction".  You can make this [tag:restricted-complexity] to make it objective, where you specify maximum asymptotic complexity requirements, a measure that is objective and indisputable.

I aggree that the brute force part may provoke problems. I tried to heal this by specifing that no supersets should be used, apart from that, anything is allowed. If that doesn't suffice, we may remove the brute force ban completely

I'm a bit lost. So, can brute force be used or not? Is there any restriction on the approaches that can be used? (note that this can be hard to enforce or verify)

I'm voting to close this question as off-topic because it has an unobservable requirement making it impossible to objectively tell if any given answer is valid and thus it's not clear if it wins.

Sad that this good challenge got closed over a minor detail. I rephrased the requirement to be explicitly restricted-complexity and voted to reopen.

Ruby, 65 55 bytes
->n{(0..2**~-n-2).map{|x|w=1;(1..n).map{|d|w+=x[n-d]}}}

Try it online!
How:
Partial sum of bits (starting with 1) of all numbers up to 2n-1-2
For example: if the number is 111010011 it becomes:
  1 1 1 0 1 0 0 1 1
  | | |   |     | |
  v v v   v     v v
 +1+1+1  +1    +1+1
  -----------------
1 2 3 4 4 5 5 5 6 7
|
Initialized to 1

05AB1E, 10 9 bytes
<oxÍŸεbηO

Try it online!
<           # decrement: n-1
 o          # 2**(n-1)
  x         # push 2 * 2**(n-1) = 2**n without popping
   Í        # 2**n - 2
    Ÿ       # range [2**(n-1), ..., 2**n - 2]
     ε      # for each number in that range:
      b     #  convert it to binary
       η    #  prefixes
        O   #  sum each prefix

Jelly, 17 16 11 bytes
’2*
Ç’Ḷ+ÇBÄ

You can try it online!
’2*      Compute 2^(n-1) (let me call it x).
Ç’       Take x and decrement it,
  Ḷ      creating the range [0, ..., x-1].
   +     Then add
    Ç    x to every element in said range,
     B   take its binary representation
      Ä  and then take the cumulative sums.

This is a golfed version of the following:
The condition \$v_{i+1} - v_i \in \{0, 1\}\$ means we can instead generate all the sequences \$d_i\$ of \$n - 1\$ elements with \$d_i \in \{0, 1\}\$ and then generate a vector \$v\$ as such:
$$\begin{cases}
v_1 = 1 \\
v_{i+1} = v_i + d_i
\end{cases}\tag{1}$$
The only sequence we can't consider is when \$d_i = 1\ \forall i\$ because in that case, \$v_n = n\$, which can't happen as per the OP. On top of that, we can see the sequences \$\{d_i\}_{i=1}^{n-1}\$ as the binary numbers from \$0\$ to \$2^{n-1} - 1\$. So we do just that: find the binary representation of all integers from \$0\$ to \$2^{n-1}-1\$ and take those sequences as the jumps, to define \$v\$ as per \$(1)\$.
’                  Take the input integer and subtract 1,
 2*                take 2 to the power of that
   ’               and finally decrement again (this builds 2^(n-1) - 1).
    Ḷ              Take the lower range [0, ... (2^(n-1)-1) - 1]
     B             and write every number in the range in binary.
            €      Now, for each binary representation
           ¿       While said binary representation
       L<³Ɗ        has length smaller than the input number,
      Ż            prepend a 0 to it.
             Ä     Take the cumulative sum of every binary representation
              +1   and add 1 to every element.

Charcoal, 20 bytes
ＩＥ⊖Ｘ²⊖θ⮌ＥＩθ⊕Σ⍘÷ιＸ²λ²

Try it online! Link is to verbose version of code. Explanation:
    ²                  Literal 2
   Ｘ                   To power
      θ                 Input
     ⊖                  Decremented
  ⊖                     Decremented
 Ｅ                      Map over implicit range
          θ             Input
         Ｉ              Cast to integer
        Ｅ               Map over implicit range
               ι        Outer index
              ÷         Integer divide by
                 ²      Literal 2
                Ｘ       To power
                  λ     Inner index
             ⍘     ²    Convert to base 2
            Σ           Digital sum
           ⊕            Incremented
       ⮌                Reversed
Ｉ                       Cast to string
                        Implicitly print

APL (Dyalog Unicode), 29 bytesSBCS
Full program.
¯1↓{⊃,/(⊂,¨0 1+⊢/)¨⍵}⍣(⎕-1),1

Try it online!
,1 the list [1]
{…}⍣(⎕-1) apply the following anonymous lambda one-less-than input times:
 (…)⍵ on the argument:
  ⊢/ take the last element (lit. right-argument reduction)
  0 1+ add [0,1] to that
  ⊂,¨ concatenate each to the entire argument
 ,/ flatten (lit. concatenation reduction)
 ⊃ disclose (since the reduction enclosed to reduce rank from 1 to 0)
¯1↓ drop the last

GolfScript, 70 bytes
[]\(:m 2\?:p{(.[2 base]@\+\.}do;{.,m\-[0]\*\+}%{1:s;{s+:s}%[1]\+ }%(;`

Try it online!
This is just my first stab, I have a few ideas on how to improve, but this is my hot garbage to start with. My goal is to get it under 50, then I'll write a full explanation.
The short is that it writes every binary combination, sums the elements recursively, then adds 1 to the front.

JavaScript (V8),  72 69  68 bytes
f=(n,a=1,p=1,m=n)=>--m?[p,p+1].map(p=>p<n&&f(n,a+[,p],p,m)):print(a)

Try it online!

Python 3, 111 108 bytes
def f(n):
 for i in range(2**(n-1)-1):
  v,j=[],1
  for c in bin(i)[2:].zfill(n):j+=int(c);v+=[j]
  print(v)

Try it online!
No gigantic superset just straight up generation of vectors using G B's partial sum of bits idea.

Pyth, 12 bytes
msM._dPh#^U2

Try it online!
Make all length n sequences of 0,1, filler for the ones that start with 1, remove the all ones sequence, form prefixes, soon the prefixes.

Python 2, 62 bytes
f=lambda n:1/n*[[1]]or[x+[x[-1]+d]for d in 0,1for x in f(n-1)]

Try it online!

R, 69 bytes
f=function(n,m=1,`?`=cbind)"if"(n-1,rbind(f(n-1,1?m),f(n-1,1?m+1)),m)

Try it online!
Simple recursive solution; returns a matrix where each row is one of the valid lists.

6502, 31 bytes
0016           .function
0016 A0 FE     LDY #FEh   ; starting bit pattern
0018           .again
0018 84 41     STY 41h    ; store current bit pattern in scratchpad
001A A9 31     LDA #049   ; ASCII "1"
001C A6 40     LDX 40h    ; load index with vector size
001E           .more_bits
001E 46 41     LSR 41h    ; shift lsb into carry
0020 69 00     ADC #0     ; add with carry
0022 85 0F     STA 0Fh    ; display ASCII char
0029 CA        DEX        ; decrease index
002A D0 F2     BNE 1Eh    ; more bits if index not zero
0024 C9 31     CMP #049   ; sequence ends in "1" so all bits zero
0026 D0 01     BNE 2Ch    ; continue
0028 60        RTS        ; exit function
0029           .continue
002C A9 2C     LDA #044   ; display...
002E 85 0F     STA 0Fh    ; ... comma
0030 88        DEY        ; next ...
0031 88        DEY        ; ... bit pattern
0032 4C 18 00  JMP 0018h  ; go again

Try It On Visual6502.org
(Press the Play button to run the program. Press Trace Less to speed up simulation). Input is at memory location 40 hex - click and enter hex numbers to modify before running. Since the 6502 is an eight bit microprocessor, for golfing purposes input is restricted from 1 to 8.


text:
Reversed Iota's
I didn't invent this challenge, but I find it very interesting to solve.
For every input number, e.g.:
4

Generate a range from 1 to that number:
[1 2 3 4]

And then, for every item in that list, generate a list from 1 to that number:
[[1] [1 2] [1 2 3] [1 2 3 4]]

Then, reverse every item of that list.
[[1] [2 1] [3 2 1] [4 3 2 1]]

Notes:

1 being a loose item is allowed, since flattening will not matter with this anyway.
To preserve the spirit of the challenge, the range has to be 1-indexed.
You may flatten the list if your platform doesn't support the concept of nested lists.

what just happened to the original poster??

@RGS Anonymization.

may we output as a sequence of numbers (1 2 1 3 2 1 4 3 2 1), say, if a platform doesn't have a concept of multi-dimensional array/list?

@S.S.Anne in what sense? And what would be a plausible reason?

@RGS The user has been disassociated from the question for some reason, probably because they didn't want to take credit for it. It's not been made Community Wiki so the answerers will still get reputation. Or, maybe the user deleted their account right after they posted this (since copying the number into /users/ doesn't work).

It should be noted that the challenge says “for every input”, implying multiple inputs are possible, but most answers only handle a single input...

@Dúthomhas I assume they meant "for any (numeric) input"?

@simonalexander2005 Hence the reason I observed it, because “for every” and “for any” mean two totally different things.

@Dúthomhas for the native english speaker yes. But a foreigner may easily use the two interchangeably. Since the question doesn't mention anything about multiple inputs/outputs, how to format them or if the program asks for them all at once or one at a time, the simplest interpretation is probably consensus.

APL (Dyalog Unicode), 5 4 bytesSBCS
Anonymous tacit prefix function.
,⍨\⍳

Try it online!
,⍨\ cumulative reverse-concatenation reduction of
⍳ the iota

"1 being a loose item is allowed" if I understand this, this allows for a 4-byter

@KritixiLithos Ah, that's what it means. Nice.

R, 22 19 bytes
Map(`:`,1:scan(),1)

Try it online!
Map(f,...) applies f elementwise to each member of ..., recycling as needed, resulting in a list, so we just supply 1 as the to argument to : to get the reversed.
-3 bytes thanks to Vlo!

Map() 19b, https://tio.run/##K/r/3zexQCPBKkHH0Ko4OTFPQ1PHUPO/6X8A

@Vlo I don't know why I didn't think of that; Map is pretty much always shorter than lapply, and more flexible too...Thanks!

Jelly, 3 bytes
RRU

R     Range from 1 to input
 R    (implicitly) map over said range and create a range from 1 to this element
  U   reverse each of those

You can try it online!
Courtesy of @JonathanAllan, we also have two other 3-"byters"
RrL
RrE

I think it is not often that golfing languages solve a challenge with only a-zA-Z characters

Reminds me of https://codegolf.stackexchange.com/a/133116, a Pyth answer consisting only of S and s.

A couple more 3 byte a-zA-Z only solutions are RrL and RrE.

@JonathanAllan I don't think I understand the RrE one :/

Pure Bash (no external utilities), 29
eval eval echo \\{{1..$1}..1}

Try it online!

05AB1E, 3 bytes
LLí

Try it online!

Wolfram Language (Mathematica), 20 bytes
Range[Range@#,1,-1]&

Try it online!
-3 bytes from @att

Range is Listable, so you can save one byte: Reverse/@Range@Range@#&.

#-Range@#+1&~Array~#& for 21

...and Range[Range@#,1,-1]& for 20

shell + sed, 15 bytes
seq $1|sed G\;h

Try it online!
Outputs like so, 1\n\n2\n1\n\n3\n2\n1\n\n[...]
seq $1 creates a sequence from 1 to the first argument $1
|sed ... which is piped into a sed script
sed works on a line-by-line basis; it first reads the first line into the buffer, called the "pattern space", after which the program commands is run on it. At the end of the program's execution on the first line, the remaining pattern space is implicitly printed. Then sed reads the next line into the pattern space, replacing the previous contents, and runs the commands on it, repeating for all lines of input (unless a command specifies otherwise).
The pattern space is not saved between lines, but what is is the hold space. The hold space is another buffer, that starts empty, and can be modified by program commands. Its contents are carried on to the execution of the next line of input.
The G command appends a newline followed by the content of the hold space to that of the pattern space. Then the h command replaces the hold space with the content of the pattern space. This effectively reverses the lines of input encountered so far, writing them to the pattern space – implicitly printing at the end of processing the current line – and saving them to the hold space so that upon reading subsequent lines of input, the new reversed "list" can be constructed with G;h.
The ; is escaped in the program as \; because otherwise the shell interprets it as terminating a shell command.

Perl 6 Raku, 24 15 13 10 bytes
-2 removed parenthesis
-3 thanks to nwellnhof
^*+1 X…1

Try it online!
Explanation
^*+1     # make a range from 1 .. argument (whatever star).
     X…1 # create ranges descending to 1 using cross product metaoperator.

Previous version, 24 bytes
(^<<(^*+1)X+1)>>.reverse

Try it online!
Explanation
     ^*+1                # make a range from 1 .. argument (whatever star)
 ^<<(    )               # replace each element with a range from 0 .. element - 1
                         # (via hyper prefix operator)
          X+1            # shift the range to 1 .. element
                         # (via cross product metaoperator)
(            )>>.reverse # reverse each list (via hyper method operator)

10 bytes. I have no idea why X... doesn't work.

@nwellnhof Very interesting. I think I tried X..., but not this. I remember getting the same results. I definitely use X much more frequently than a pair of >>

Some update has made the unicode operator act the same as the ascii equivalent, breaking this elegant answer

K (ngn/k), 8 bytes
|',\1+!:

Try it online!
-2 thanks to ngn :-)

Another 8-byter is -!'-1-!:

@coltim neat :-)

Based on coltims suggestion, -!'|!-: works for 7

JavaScript (ES6),  50  49 bytes
Saved 1 byte thanks to @Shaggy
f=n=>n?[...f(n-1),(g=_=>n?[n,...g(--n)]:[])()]:[]

Try it online!

49 bytes

PHP, 54 bytes
function($x){for(;$y<$x;$a[]=range(++$y,1));return$a;}

Try it online!
Or recursive:
PHP, 54 bytes
function f($x){return$x?f($x-1)+[$x=>range($x,1)]:[];}

Try it online!
Or with PHP-formatted printed output:
PHP, 38 bytes
for(;$x<$argn;print_r(range(++$x,1)));

Try it online!

x86-16 machine code, 12 bytes
Binary:
00000000: 33c0 4050 ab48 75fc 58e2 f7c3         3.@P.Hu.X...

Unassembled listing:
33 C0       XOR  AX, AX         ; AX = 0
        OUT_LOOP:
40          INC  AX             ; start at 1
50          PUSH AX             ; save starting position
        IN_LOOP:
AB          STOSW               ; write to output buffer, increment DI
48          DEC  AX             ; AX--
75 FC       JNZ  IN_LOOP        ; if AX > 0, keep looping
58          POP  AX             ; restore starting position
E2 F7       LOOP OUT_LOOP
C3          RET                 ; return to caller

Input Number in CX, output array of WORD, at [DI].
Example I/O using DOS test driver program:

What do you run DOS on?

@S.S.Anne this example I just ran in DOSBox because I was lazy. Typically I'll use PCE to test since it's an actual IBM PC 5150 "bare metal" emulation.

Ah, DOSBox. Now that I look at it more closely it does look like DOSBox.

Raku, 13 bytes
{[\R,] 1..$_}

Try it online!
Cumulative reverse with the range 1 to input.

One of the great things about Raku is that there are at least two equally short ways to do it.

BQN, 10 bytes
Anonymous tacit prefix function.
(⌽1+↕)¨1+↕

Try it online!
Explanation
(⌽1+↕)¨1+↕
       1+↕    1.  Get list of integers from 1 to n.
      ¨       2a. For each integer i in the list...
( 1+↕)        2b. get a list of integers from 1 to i...
(⌽   )        2c. and then reverse that list.

PowerShell, 19 bytes
1.."$args"|%{$_..1}

Try it online!
Generates the range from 1 to input $args, then constructs the reversed range for each of those numbers. Tack on a -join to better see how the arrays are created (because PowerShell inserts a newline between each element, it's tough to see the individual arrays).

Python 3, 46 bytes
lambda n:[[*range(i+1,0,-1)]for i in range(n)]

Try it online!

GolfScript, 12 (13) bytes
,{)),(;-1%}%`

,{)),(;-1%}%` #Reversed iota of iota
,             #0 to n-1 iota
 {        }%  #For each element in the iota
 {))      }   #Increment by 2
 {  ,     }   #Iota
 {   (;   }   #Pop leading 0
 {     -1%}   #Reverse it
            ` #Pretty output, not needed if you use a better stack-interpreter

Try it online!
Below is my old solution, I gained inspiration after posting and improved it.
),(;{),(;-1%}%`

Comma is the function that builds an array 0 to n-1, "iota expand".
),(;{),(;-1%}%` #Take in a number, output reversed expanded iota
)               #Increment input by 1
 ,              #Iota expand
  (;            #Remove leading 0
    {       }%  #For every element, do the following
    {)      }   #Increment by 1
    { ,     }   #Iota expand
    {  (;   }   #Remove leading 0
    {    -1%}   #Reverse
              ` #Pretty output; technically not needed

Try it online!

It feels like you are from the previous decade - you are wielding GolfScript so well!

I had a week off and wanted to learn an esolang for codegolf - osabie was a bit too over-the-top, APL had too much to remember, but Golfscript was easy for me to understand right away - so I spent an entire week just doubling down learning the ins and outs, and now I can visualize the stack and understand exactly what I'm doing as I'm doing it, it's a very elegant language.

Ruby, 34 30 bytes
->n,*a{(1..n).map{|x|a=[x]+a}}

Try it online!
Thanks Value Ink (as usual) for -4 bytes.

->n,*a{(1..n).map{|x|a=[x]+a}} is 30 bytes

Factor, 45 bytes
: f ( n -- s ) [1,b] [ 1 [a,b] >array ] map ;

Try it online!

Haskell, 27 bytes
f n=scanl(flip(:))[1][2..n]

Zsh, 22 bytes
eval echo {{1..$1}..1}

Try it online!
{{1..$1}..1} -> {1..1} {2..1} {3..1} {4..1} ...
eval echo {1..1} {2..1} {3..1} ... -> echo 1 2 1 3 2 1 ...
If the sublists must be delimited, then 25 bytes for , or 26 bytes for newline.

Fortran (GFortran), 47 bytes
read*,i
print*,("{",(j,j=k,1,-1),"}",k=1,i)
end

Try it online!
Could remove 8 chars by getting rid of printed brackets if anyone would believe that they are lists otherwise.

Arturo, 22 18 bytes
$=>[map&=>[@&..1]]

Try it

Elm, 45 bytes
r=List.range 1
f=List.map(List.reverse<<r)<<r

Try it on Ellie

Haskell, 74 73 51 bytes
main=do i<-getLine;print[[x,x-1..1]|x<-[1..read i]]
Try it online!
-22 bytes thanks to @79037662

I think you can remove the space after reverse

@mabel oh yeah, i had that in my code, just posted an old one, mb

You can remove the type annotation for main. Also, you could write a function instead of a full program.

51 bytes: main=do i<-getLine;print[[x,x-1..1]|x<-[1..read i]] Removing unnecessary boilerplate, and using [x,x-1..1] instead of reverse.

26 bytes if it's just a function and not a whole program: https://tio.run/##y0gszk7Nyfn/P02hwjY6Ok8nT9dQT88wtibPRjcayKqIjf2fm5iZZ1tQlJlXopKmYPIfAA

Not completely familiar with the details of Haskell syntax - but I wonder if something like i n=[1..n];(map(rev.i)).i might work.

Brachylog, 5 bytes
⟦₁⟧₁ᵐ

Try it online!
Explanation
⟦₁     Ascending range from 1 to the input
    ᵐ  Map:
  ⟧₁     Descending range from 1 to the mapped element

Burlesque, 9 bytes
riroq<-pa

Try it online!
ri  # Read int
ro  # Range [1,N]
q<- # Boxed reverse
pa  # Operate over ((1), (1 2), (1 2 3),...)

Alternative 9 byter, but this also has an empty list as the first element:
riroiT)<-

FunStack alpha, 25 bytes
Reverse map IFrom1 IFrom1

Try it at Replit!
Explanation
                   IFrom1  Inclusive range from 1 to the argument
            IFrom1         Inclusive range from 1 to each of those numbers
Reverse map                Reverse each sublist

Go, 105 bytes
func(n int)(o[][]int){for i:=1;i<=n;i++{J:=[]int{}
for j:=i;j>0;j--{J=append(J,j)}
o=append(o,J)}
return}

Attempt This Online!

shell with seq loop, 46 bytes
for n in `seq $1`;do seq -s\  -t'\n' $n 1;done

JavaScript, 60 bytes
Without recursion:
n=>eval('for(a=[];n;a[--n]=b)for(b=[j=n];j-->1;b[n-j]=j);a')

Try it:

f=n=>eval('for(a=[];n;a[--n]=b)for(b=[j=n];j-->1;b[n-j]=j);a')

console.log(JSON.stringify(f(1)));
console.log(JSON.stringify(f(2)));
console.log(JSON.stringify(f(3)));
console.log(JSON.stringify(f(4)));

+1 for avoiding recursion. Welcome CG.SE EM

Nibbles, 2 bytes
,$\,

Attempt This Online!
  Map
,  range
$   input (each line)
\  reverse
,   range
     it

Erlang 58 bytes
f(N)->[lists:reverse(lists:seq(1,X))||X<-lists:seq(1,N)].

Python 3, 69 \$\cdots\$ 48 46 bytes
lambda n:[[*range(i+1,0,-1)]for i in range(n)]

Try it online!

Pyth, 5 bytes
_MSMS

Try it online!

4 bytes

Japt, 4 bytes
õ!õ1

Try it here

C (gcc), 54 bytes
i,t;f(n){for(i=0;n/++i;)for(t=i;t;)printf("%d ",t--);}

Try it online!

OMG I just wrote this and was looking to see if there was any other c answers before posting (not posting)! :-)

@Noodle9 I wrote this a long time ago but I made some improvements before writing my answer.

You can get this shorter if you use just one loop - here's a start.  But I got it even shorter with recursive, non-loop approach :)

@Digital You can shorten yours with division -- I'll get back to it later if you need more details.

PHP, 54 bytes
for(;$i++<$argn;)$a[]=str_split($s=$i.$s);print_r($a);

Try it online!

Retina, 20 bytes
.+
*
L$w`_+
$.&
O$^`

Try it online! Explanation:
.+
*

Convert the input to a string of _s of that length.
L$w`_+
$.&

List the lengths of all the possible substrings. The way Retina enumerates substrings means that the lengths are in the exact reverse of the desired order.
O$^`

Reverse the output line-by-line.

J, 11 bytes
[:<@|.\1+i.

Try it online!
         i.    a list 0..n-1
        +      add
       1       one to it -> a list 1..n
      \        for each prefix of the list (1, 1 2, 1 2 3...)
    |.         reverse
   @           and
  <            box
[:             cap the fork

K (oK), 14 bytes
{{|1+!x}'1+!x}

Try it online!
{            }  a function with parameter x
           !x   a list 0..n-1
         1+     add one to it -> a list 1..n
 {     }'       apply this function to each of the elements of the above list
     !x         a list 0..n-1
   1+           add one to it -> a list 1..n
  |             reverse

MathGolf, 4 bytes
╒╒mx

Try it online.
Explanation:
╒     # Push a list in the range [1, (implicit) input-integer]
 ╒    # Convert each inner value to a list in the range [1, value]
  m   # Map over this list of lists:
   x  #  And reverse each inner list
      # (after which the entire stack joined together is output implicitly as result)

C (gcc), 42
I felt like there must be an elegant recursive solution to this.  This is the shortest I could come up with, though there is probably more room for golf.

4 bytes saved thanks to @S.S.Anne.

f(n,m){n&&f(n-m/n,m%n+1)*printf("%d ",m);}

Initially, the function is called as f(N, 1), where N is the input integer.
Try it online!

f(n-m/n saves 3 bytes. Test it with higher inputs, though.

@S.S.Anne Thanks.  I like the symmetry of using m/n and m%n as well :).

In general any >= can be replaced by /. The same goes for <= but you reverse the arguments.

42 bytes

Java (JDK), 98 bytes
n->{int a[][]=new int[n][],i=0,j;for(;i<n;)for(a[i]=new int[j=++i];j>0;)a[i-1][--j]=i-j;return a;}

Try it online!

Coffeescript, 29 bytes
r=(x)->[[y..1]for y in[1..x]]

Try it online!

T-SQL, 145 bytes
WITH a(n)as(SELECT number FROM spt_values
WHERE'p'=type)SELECT string_agg(@+1-a.n,' ')FROM
a,a b WHERE a.n<=@ and b.n<a.n
GROUP BY b.n ORDER BY 1

Try it online

Stax, 6 bytes
RmRr|u

Run and debug it

tinylisp 2, 14 bytes
(.(p m to1)1to

Try it at Replit! Example session:
tl2> (.(p m to1)1to
(() (_arg) ((p m to1) (1to _arg)))
tl2> (d F _)
F
tl2> (F 5)
((1) (2 1) (3 2 1) (4 3 2 1) (5 4 3 2 1))

Explanation
(.(p m to1)1to)
  (p      )      ; Partially apply
     m           ;  the map function
       to1       ;  to the to1 function (given N, return the list of numbers from
                 ;  N down to 1)
(.            )  ; Compose that with
           1to   ; the 1to function (given N, return the list of numbers from
                 ; 1 up to N)

Thus: take one argument N; generate the range from 1 to N; then for each of those numbers, generate the range from it down to 1.

Swift 5.6+, 42 bytes
{(1...$0).map{n->[_]in(1...n).reversed()}}

Type information (here ->[_]) is required. Without it, the return type is [ReversedCollection<ClosedRange<_>>], as the range primitive's .reversed() method is lazy by default.
SwiftFiddle link with both ways (with and without type info) to highlight the difference.
This technically isn't even full type info, as the actual type of number used is left unspecified, as _. It doesn't even necessarily have to be a builtin type as long as it meets certain requirements. With full generics, the function might look something like this (ungolfed):
func f<T: Strideable & ExpressibleByIntegerLiteral>(_ n: T) -> [[T]]
where T.Stride: SignedInteger {
    return (1 ... n).map { i in
        (1 ... i).reversed()
    }
}

Pip, -p 12 bytes
Fl\,aO R\,lx

How?
Fl\,aO R\,lx  : One arg; int
    a         : First input(max for range)
Fl            : For each in:
  \,a         : Range from 1 to a
        \,l     : Range from 1 to l(int from range)
       R        : Reverse
     O          : Output
           x  : Trigger output

Try It Online!

This is super late, but here's a 10-byte version: Fl\,aPl-,l

Julia 1.0, 27 21 bytes
~n=1:n.|>i->[i:-1:1;]

Try it online!
-6 bytes (!!) thanks to MarcMush: Replace map with a broadcast .|>

21 bytes (tip in this answer)

Pyt, 5 bytes
řĐř-⁺

Try it online!
Code worked on input of 3:

Code
Stack
Description

ř
[1,2,3]
implicit input; řangify [1,2,...,n]

Đ
[1,2,3] [1,2,3]
Đuplicate

ř
[1,2,3] [[1],[1,2],[1,2,3]]
řangify

-
[[0],[1,0],[2,1,0]]
subtract

⁺
[[1],[2,1],[3,2,1]]
increment; implicit print

Vyxal, 3 bytes
ɾɾR

Try it Online!
Can't believe I never answered this challenge despite the fact it was asked by one of the greatest golfers I ever knew
Explained
ɾɾR
ɾ   # the range [1, input]
 ɾ  # and that for each item in the range
  R # vectorised reverse

Nekomata, 4 bytes
RRᵐ↔

Attempt This Online!
R       Range
 R      Range
  ᵐ     Map
   ↔    Reverse

J-uby, 19 13 bytes
:+|:*&(:+|:~)

Attempt This Online!
Explanation
:+ | :* & (:+ | :~)
:+ |                 # Range 1..input, then
     :* & (       )  # Map with...
           :+ | :~   #   Range 1..n, then reverse

Thunno 2, 3 bytes
RRṃ

Attempt This Online!
Explanation
RRṃ  # Implicit input   ->  5
R    # Push [1..input]  ->  [1 2 3 4 5]
 R   # Push [1..each]   ->  [[1] [1 2] [1 2 3] [1 2 3 4] [1 2 3 4 5]]
  ṃ  # Reverse each     ->  [[1] [2 1] [3 2 1] [4 3 2 1] [5 4 3 2 1]]
     # Implicit output

Pip -p, 7 bytes
R*\,\,a

Attempt This Online!
Explanation
R*\,\,a
      a  ; Command-line argument
    \,   ; Inclusive range from 1 to that number
  \,     ; Inclusive range from 1 to each of those numbers
R*       ; Reverse each

Uiua SBCS, 7 bytes
¯⍚⇌⍚⇡⇡¯

Try it!
¯⍚⇌⍚⇡⇡¯
      ¯  # negate
     ⇡   # range
   ⍚⇡    # range w/ boxing
 ⍚⇌      # reverse each
¯        # negate

Swift 5.9, 44 bytes
let f={(1...$0).map{(1...$0).reversed()+[]}}

Charcoal, 9 bytes
ＩＥＮ⮌Ｅ⊕ι⊕μ

Try it online! Link is to verbose version of code. Explanation:
  Ｎ         Input as a number
 Ｅ          Map over implicit 0-indexed range
      ι     Current index
     ⊕      Incremented
    Ｅ       Map over implicit 0-indexed range
        μ   Inner index
       ⊕    Incremented
   ⮌        Reversed
Ｉ           Cast to string for implicit print

There are other ways of getting the inner range such as InclusiveRange(1, Incremented(i)) and Range(1, Plus(2, i)) for the same byte count.

Clojure, 36 bytes
#(for[i(range %)](range(inc i)0 -1))

Try it online!

Kotlin, 37 bytes
{(1..it).map{(it downTo 1).toList()}}

Try it online!