text:
The max() is not enough
Intro
A friend posed this question today in a slightly different way - "Can a single [Python] command determine the largest of some integers AND that they aren't equal?".
While we didn't find a way to do this within reasonable definitions of "a single command", I thought it might be a fun problem to golf.
 Challenge
"Return the largest of a list of integers if-and-only-if they are not all equal."
More specifically:
Given a string containing only a comma-separated list of integers:

If they are all equal, return/output nothing
Else, return/output the largest

Rules

The input must be a string containing only a comma-separated list of integers
The output must be either nothing (no output of any kind), or else the largest element from the input, represented as it is in the input

Entries may be a full program or just a function, provided you provide some way to test them!
Assumptions

Assume input list elements may be more than one digit but no larger than
( 232 − 1 )
Assume the input list has no more than a million elements
Assume the input will not include negative values
Assume the input will never be empty

For the avoidance of doubt, the explanation of the challenge given just after "More specifically" shall supersede the statement of the challenge above it ("Return the largest...").
 Examples
(1) All equal:
Input: 1,1
Output:

(2) Dissimilar:
Input: 1,2
Output: 2

(3) Zero!:
Input: 0,0,0,0,0,0,0,1,0,0
Output: 1

(4) Random:
Input: 7,3,8,4,8,3,9,4,6,1,3,7,5
Output: 9

(5) Larger numbers, larger list:
Input: 627,3894,863,5195,7789,5269,8887,3262,1448,3192
Output: 8887

Additional examples:
(6) All equal, larger list:
Input: 7,7,7,7,7,7,7,7,7
Output:

(7) All equal, larger list, larger numbers:
Input: 61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976,61976
Output:

(8) Not equal, larger list, larger numbers:
Input: 96185,482754,96185,96185,96185,96185,96185,96185,7,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,96185,961185,96185,96185,96185
Output: 961185

Scoring
This is code-golf, so the code with the shortest number of bytes wins!

Is it OK to throw an error when the list contains all equal values? And can we output a null value (such as None in python) rather than outputting nothing? Also, why must the input be a string rather than a list? And what do you mean by the largest element from the input, represented as it is in the input

I'd suggest loosening the input requirements to allow for an array/list of integers, too. Are we guaranteed that the list will contain at least 2 elements? Can we output a consistent, non-numeric value instead of nothing if all integers are equal?

Please add a test case where the maximum occurs more than once, like 7,3,7,2.

Can we have a test case with only one element? Also, can we include a trailing , in the input?

Info: This challenge was sandboxed. /// For OP: Although the sandbox is pretty inactive, (I think) it is only a minor problem. The problem is that some problems with the challenge are not apparent if one only reads the challenge, and can only be discovered when one actually solves it.

@user202729 Most of the things stated above were also mentioned in the Sandbox though. To quote OP's response on the suggestions: "I figure I'll try strict requirements this time around and if it's a problem I'll avoid them in future." So the comma-separated string with empty string output if all items are equal is mandatory for this challenge I'm afraid.. (instead of list/array/stream/new-lines delimited inputs and any distinct falsey output as I would suggest for future challenges)

I really don't feel like writing a string splitting function for the 100th time right now.

If there is exactly one element in the list, that means all elements are equal and the program should output nothing, correct? It would be good to add that as a test case.

R, 50 37 bytes
-33 bytes thanks to digEmAll! -13 bytes thanks to rturnbull!
x=scan(se=",");if(any(diff(x)))max(x)

Try it online!

Input does (currently) HAVE to be a string, unfortunately.

50 bytes taking a comma separated string

Oops I guess my prior link was wrong! This should be right, combining digEmAll's idea with the one I intended on posting...

37 bytes by improving how we test the array for equality.

Perl 6, 26 23 22 bytes
-1 byte thanks to nwellnhof
{.max if .Set>1}o&EVAL

Try it online!
Returns an empty slip if everything is equal.
Explanation
                o&EVAL  # Eval the string to a list of integers
{              }         # Pass to code block
 .max            # Return the max
      if .Set>1  # If the list converted to a set has more than one element

The EVAL trick is neat and you can even save a byte with o&EVAL.

Wouldn’t if +.Set work?

@Ven No, we need to check if there is more than one element in the Set.

Mh, and bitwise ~ is 2 bytes in Perl 6 :(

MathGolf, 5 bytes
è▀s╞╙

Try it online!
Explanation
è      Read whole input as int array
 ▀     Get unique elements
  s    Sort list
   ╞   Discard from left of array
    ╙  Get maximum of list

This works because both the max operator and the discard from left operator don't do anything for empty lists. Well, the max operator removes the list and pushes nothing for empty lists.
It could be 4 bytes if input could be taken as a list.

Input must be a comma separated string.

@Shaggy I missed that. Right now MathGolf doesn't have a "split on character" operator, so it'll take some work to get it right. I'll see what I can do.

Jelly, 4 bytes
ḟṀE?

A full program accepting the input as a command line argument (unquoted) which prints the required output
(Note that it deals with: empty input like , single item input like 7 and multiple item input like 7,8,7 like the spec seems to currently require.)
Try it online!
How?
ḟṀE? - Full program: if one argument is present it is evaluated using Python
     -                 so 7,8,7 -> [7,8,7], while 7 -> 7
ḟṀE? - Main Link: list or integer OR no argument (in which case an implicit argument of 0)
   ? - if...
  E  - ...condition: all equal? (for any integer E yields 1 since the argument is
     -                           treated as a list like [integer])
ḟ    - ...then: filter discard (since it's undefined the right argument is implicitly
     -                          equal to the left; both are treated as lists, so this
     -                          yields an empty list)
 Ṁ   - ...else: maximum (again an integer is treated as a list)
     - implicit print (Jelly's representation of an empty list is an empty string
     -                 furthermore no newline is printed in either case)

APL (Dyalog Unicode), 12 bytes
Full program. Prompts for string from stdin.
{1≠≢∪⍵:⌈/⍵}⎕

Try it online!
⎕ prompt for and evaluate expression (commas concatenate the numbers into a list)
{…} apply the following anonymous lambda (⍵ is the argument; the list of numbers):
 1≠ [if] 1 is different from…
 ≢ the tally of…
 ∪ the unique numbers in…
 ⍵ the list
 : then
 ⌈/ return the max across (lit. max reduction)…
 ⍵ the list
 [else: do nothing]

1≠≢∪ here it seems find only if its argument is a list not a repetition of the same number so it is not 1 1 1 or 22 . So 1≠≢∪1 1 2 3 3 return true even if 3 is not unique and if that is true would return ⌈/⍵ the max 3 (even if it should return no output). Where is my error? Or possible ':' has a different meaning

@RosLuP Even if there are repetitions, and even repetitions of the max number, we still have to print the max. Only if the list has exactly one unique number do we print nothing. Look at the last example case in the OP.

Yes I wrongly understood the problem... thanks

would this work? ⌈/~⌊/

@ngn No, it outputs a newline if all elements are equal.

⍪⌈/~⌊/ then?

@ngn Yes! That's very nice. Post it!

Nice way of getting around the input requirement!

APL (Dyalog Classic), 6 bytes
⍪⌈/~⌊/

Try it online!
a train computing the maximum (⌈/) without (~) the minium (⌊/) turned into a matrix (⍪)
if the input contains only one distinct element, ⌈/~⌊/ will be empty and ⍪ will return a 0×1 matrix which renders as nothing
otherwise, ⌈/~⌊/ will be a 1-element vector and its ⍪ will be a 1x1 matrix (visually indistinguishable from a scalar) that contains the maximum

CJam, 16 13 bytes
q',/:iL|$1>W>

Try it online!

JavaScript (Node.js), 49/53 bytes
My original version using .every(), 53 bytes
Does a function returning '' count as no output? Sure this can be improved upon...
s=>(a=s.split`,`).every(e=>a[0]==e)?'':Math.max(...a)

Try it online!

Improved version using Set() by Shaggy, 49 bytes
s=>new Set(a=s.split`,`).size>1?Math.max(...a):``

Try it online!

A very quick improvement: https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@7/Y1i4vtVwhOLVEI9G2WK@4ICezJEEnQVOvOLMq1c7Q3jexJEMvN7FCQ09PL1HTKiHh/38A

@Shaggy nice! I started off using Set but couldn't get it as short as that

Python 2, 42 41 bytes
a=input();print('',max(a))[len(set(a))>1]

Try it online!

Welcome to PPCG :) I don't know Python but it looks like this requires input as list. Unfortunately (and unnecessarily, my opinion) the spec is (currently) very explicit that input must be a string.

@Shaggy, this program works if the input is of the form element, element, .... i.e, it doesn't have to be enclosed in brackets.

A list does work, but is not required because in Python 2, input by default evals whatever string is passed from stdin.

40 bytes. I don't know if a one element list can have a trailing , though, since your solution errors if the input is just a single number

@JoKing Is there a reason you could not change the != to a > as the input will never be empty?

Haskell, 77 75 61 bytes
f.read.('[':).(++"]")
f a=[0|any(/=a!!0+0)a]>>show(maximum a)

Try it online!
('[':).(++"]") takes a string (e.g. "1,2,1,3") and encloses it in bracket chars ("[1,2,1,3]"). Then read turns the string into a list of integers ([1,2,1,3]).
The function f uses this tip for a shorter conditional if one of the outcomes is the empty list. any(/=a!!0+0)a checks whether the list a contains any element that is not equal to its first element a!!0. (The +0 is needed such that read knows it has to look for a list of numbers.) If all elements are equal this test results in False and the empty string is returned. Otherwise show(maximum a), that is the maximum of the list converted to a string, is returned.

Red, 81 bytes
x: split input","forall x[x/1: load x/1]sort x: unique x if 1 <>length? x[last x]

Like the R solution, a huge chunk of the code is handling the input string "1,1,2,44,1". If we can have that as a block, eg: x: [1 1 2 44 1], then we can do it in 41 bytes:
sort x: unique x if 1 <>length? x[last x]

Welcome to PPCG! We typically ask for a link to an interpreter to verify a solution, and Dennis, one of our mods, has set up Try it online! for just such a purpose! It will even format your answer for you! Hope you enjoy your time spent here!

sort x: unique load replace/all input","" "if 1 <>length? x[last x] for 67 bytes. Unfortunately input doesn't work in TIO. If you make it a func, it works just fine in TIO: 73 bytes

Python 2, 37 bytes
outputs to stderr (debug on tio).
a=input();m=max(a);m>min(a)>exit(`m`)

Try it online!

Neim, 4 bytes
Ξ

Explanation:
  Ξ   If
    all elements are equal
    not
      then
     get greatest element

Try it online!

Currently, the input must be a comma-delimited string of integers but I've asked if we can take an array instead.

K4, 38 35 bytes
{$[1=#:t:?:(7h$","\:x)-48;;*:t@>t]}

Test Cases:
q)k){$[1=#:t:?:(7h$","\:x)-48;;*:t@>t]}"1,2,4,4"
,4
q)k){$[1=#:t:?:(7h$","\:x)-48;;*:t@>t]}"4,4,4,4"
q)
q)k){$[1=#:t:?:(7h$","\:x)-48;;*:t@>t]}"7,3,8,4,8,3,9,4,6,1,3,7,5"
,9
q)k){$[1=#:t:?:(7h$","\:x)-48;;*:t@>t]}"7,7,7,7,7,7,7,7,7,7,7,7,7"
q)

I'm not very fluent in any of the k variants available on TiO, so no online example available, I'll try to come up with one though
Explanation
If you're wondering why certain operations are performed before others, K4 does not have operator precedence, it instead interprets from right to left (though you can use parentheses for precedence). Expressions seperated by semicolons.
   $[expr;`True;`False] is the conditional format

{$[1=#:t:?:(7h$","\:x)-48;;*:t@>t]}
               ","\:x                 //split string on commas
            7h$                       //cast strings to long
                      -48             //they'll be from ascii format, so compensate
         ?:                           //get distinct list
       t:                             //set list to variable t
     #:                               //get count of t
   1=                                 //check if count t = 1
                         ;;           //return nothing if true
                             t@>t  //if false, sort t descending
                           *:         //return first value

Can probably be golfed down more, not a fan of having to use that makeshift max function at the end.
EDIT: If the commas in output are a problem, it can be fixed with two more bytes:
q)k){$[1=#:t:?:(7h$","\:x)-48;;*:,/t@>t]}"1,2,4,4"
4
                                 ,/                 //joins the single element lists into one

Taking the total to 40 37, but the comma before the number simply means that it's a single element list as opposed to an atom.

Octave, 28 bytes
Returns the maximum (a number, which is an 1x1 matrix) or an empty (1x0) matrix.
@(a)max(a)(1+all(a(1)==a):1)

Try it online!

Input is a string of comma separated numbers

Japt, 16 bytes
This would be 9 if not for the unnecessarily strict input format, 7 if throwing an error counts as outputting nothing.
Assumes the string contains at least 2 integers.
q, mn
â ÊÉ?Urw:P

Try it

PHP (<=5.6) 64 74 bytes
 echo array_count_values($a=split(',',$argn))[$m=max($a)]==count($a)?'':$m;

Run as pipe with -nR or test it online
split was removed in PHP7, but as I had to add 10 to fix a few issues, it was worth using instead of explode which is roughly equivalent in this case.

Also this doesn't work when there are more than one element with the max value  I missread the If they are all equal, return/output nothing to be If they are equal, return/output nothing meaning if there are more then one to output empty.  Adding ==count($a) fixes it.  Because array_count_values counts the number of times it appears in the array, if that equals the total amount of elements in the array then output '' otherwise output the max

@JoKing - You shouldn't be taking input via a pre-declared variable - fixed using $argn it takes it from stdin (this has been used in multiple golf answers) I can give examples of not only mine but other users.

Common Lisp, 102 bytes
(lambda(x &aux(c(read-from-string(concatenate'string"#.`("x")"))))(or(apply'= c)(princ(apply'max c))))

Try it online!
The size is mainly due to inputting the data; with input as a regular list, the length reduces to 46 bytes:
(lambda(x)(or(apply'= x)(princ(apply'max x))))

05AB1E, 9 8 bytes
',¡ZsËiõ

-1 byte thanks to @Cowabunghole.
Try it online or verify all test cases.
Explanation:
',¡        '# Split the (implicit) input by ","
   Z        # Push the maximum (without popping the list)
    s       # Swap so the list is at the top of the stack again
     Ëi     # If all elements are equal:
       õ    #  Push an empty string ""
            # (Implicitly output the top of the stack to STDOUT as result)

Pretty similar solution, but you can avoid the else by doing ',¡ZsËiõ, saving 1 byte

@Cowabunghole Smart, thanks!

Japt -hF, 8 bytes
q, ün Åc

Try it
-3 bytes if the input could be taken as an array.

PowerShell, 45 49 bytes
+4 bytes thanks Veskah
($l=$args-split','|sort{+$_}-u)[-1]|?{$l.count-1}

Try it online!
Less golfed:
$list=$args-split','|sort{+$_}-unuqie
$max=$list[-1]
$max|?{$list.count-1}

Fun fact, this actually doesn't work in PS v5 because sort was changed to lexicographical ordering

Vyxal, 5 bytes
≈[¤|G

Try it Online!
≈[    # If all same
  ¤   # ""
   |G # Else max

Jelly, 3 bytes
ṀḟṂ

Try it online!
TIO link uses function I/O for the sake of having a test harness, but it works just fine with a plain comma-separated list. I'd prefer to let a challenge like this stay dead, but if it's been bumped anyways...
Ṁ      The maximum,
 ḟ     unless it's equal to
  Ṃ    the minimum.

Python 2, 44 bytes
k=eval(input())
if~-len(set(k)):print max(k)

Try it online!

I'm guessing eval in Python converts a comma-delimited string to a list?

Yes; more exactly a tuple (immutable list). If the input were not a string (i.e., omit quotes in TIO input section), then one could just use k=input() and get the same result.

Ohm v2, 9 bytes
Ul1E?Oq¿↑

Try it online!
Explanation:
Ul1E?Oq¿↑
U         Uniquify input
 l        Get length
  1E      Push whether length is equak to 1
    ?Oq   If so immediately quit
       ¿↑ Else print maximum

The input should be a string of comma separated numbers

Pyth, 7 bytes
Itl{QeS

Try it online!
All test cases (slightly different code for better output formatting)
As Pyth is based on Python, user input is always interpreted as a string, which then may be passed through eval(). All Pyth programs automatically run Q=eval(input()) as their first instruction.
Explanation:
Itl{QeS  | Full code
Itl{QeSQ | with implicit variables filled
---------+-------------------------------
I        | If
 t       | one less than
  l      | the length of
   {Q    | the deduplicated input
         | is truthy (!=0),
         | print
     e   | the last element of
      SQ | the sorted input

Charcoal, 15 bytes
≔Ｉ⪪Ｓ,θ¿›⌈θ⌊θＩ⌈θ

Try it online! Link is to verbose version of code. Explanation:
≔Ｉ⪪Ｓ,θ

Split the input on commas and cast each value to integer.
¿›⌈θ⌊θ

Test whether the maximum value is greater than the minimum value.
Ｉ⌈θ

If so then cast the maximum value to string and print.

Mathematica, 43 bytes
If[!Equal@@#,Max@#]&@@#~ImportString~"CSV"&

Pure function. Takes a comma-separated string as input and returns either a number or Null. I believe this is valid, as Null is not graphically displayed:

C (gcc), 91 bytes
M(s)char*s;{long m=atol(s),o,l=0;for(;s=strchr(s,44);o<0?m-=o:0)l|=o=m-atol(++s);s=l?m:-1;}

Try it online!
Degolf
M(s)char*s;{
    long m=atol(s),o,l=0; // Read the first integer from string
    for(;s=strchr(s,44); // Advance pointer to next ','
           o<0?m-=o:0) // End of loop: if difference <0, deduct from max, increasing it to new max.
        l|=o=m-atol(++s); // Read next number, and subtract it from current max.
                          // Bitwise-OR the difference into the l-variable
    s=l?m:-1; // End of function: if l is non-zero, there were at least two different values.
              // Return -1 if l is zero, otherwise the max value.
}

Suggest M(char*s) instead of M(s)char*s; and index() instead of strchr()

XPath 3.1, 54 bytes
with the input string as the context item:
let$t:=tokenize(.,',')!xs:int(.)return max($t)[$t!=$t]

Could be reduced by one character if you allow the context to bind a shorter prefix than "xs" to the XML Schema namespace.
Explanation: takes the input string, tokenizes on "," separator, applies xs:int() to each token to convert to an integer, computes the max of the sequence, outputs the max provided the predicate $t!=$t is true. If A and B are sequences, then A!=B is true iff there is a pair of items (a from A, b from B) such that a!=b.
If the input can be supplied as a sequence of integers $s rather than a comma-separated string then the solution reduces to
max($s)[$s!=$s]

(15 bytes - which might well be the shortest solution in a language that isn't purpose-designed for brevity)
NOTE: this doesn't satisfy the requirement "represented as it is in the input" - if there's an integer with leading zeroes or a plus sign in the input, these will be lost. I suspect that's true of many other solutions as well.

Java (JDK), 101 bytes
d->{long m=0,c=-1,b;for(var s:d.split(",")){b=new Long(s);c=c<0|c==b?b:0;m=b>m?b:m;}return c>0?"":m;}

Try it online!
Explained
d->{                            // Function taking a String input
    long m=0,c=-1,b;            // Initialise variables
    for(var s:d.split(",")){    // Split by comma and loop over elements
        b=new Long(s);          // Parse String to Long
        c=c<0                   // If c<0 (i.e. this is the first element)
            |c==b               // ...or c is equal to the current element
            ?b                  // Set c to the current element (all elements are the same so far
            :0;                 // Otherwise set c to zero to denote that list is not all same element
        m=b>m?b:m;              // Set m to max of b and m
    }
    return c>0?""               // If c is not zero then all elements are the same, return nothing
                 :m;            // Else return max element
}

Bonus solution!
Despite my best efforts I couldn't get this solution using regex and Streams to less than 105 bytes, but I really liked its elegance so had to give it an honourary mention;
d->d.matches("(.+?)(,\\1)+")?"":java.util.Arrays.stream(d.split(",")).map(Long::new).reduce(0L,Long::max)

100 bytes by using a combination of your regex (minus the ?) and a regular loop and return (instead of stream).

MATL, 15 9 bytes
U&=?}1MX>

Try it online!
Multiple testcases
Just trying to keep my MATL chops from getting too rusty!
Edit: rusty after all; saved 6 bytes, thanks to @LuisMendo.
Explanation
U     % str2num - automatically parses comma-separated strings
&=?   % Are all the values equal?
}     % if not
1M    % Get the numeric matrix again on the stack
X>    % And find its maximum value.

Pip, 13 bytes
a^:',MXaRMMNa

Try it online!
Uses the approach from ngn's APL solution:
     MNa  Minimum of the list
  aRM     Remove it from the list
MX        Take the max of the remaining elements

The first 5 bytes a^:', split the input string on commas.
Alternate 13-byte solutions:
I!$=Ya^',PMXy
a^:',$=a?uMXa

Perl 6, 28 22 bytes
{.max x![==] $_}o&EVAL

Try it online!
-6 bytes thanks to @ASCII-only

Links on this one as well please :P (just save the explanation somewhere and add it back in after pasting the autogenerated submission)

I need to get into the habit. Ty

Preferably with the testcases in the question (and optionally more) :P (use header to assign the function, footer to run testcases)

Also, seems to be invalid. "The output must be either nothing (no output of any kind), or else the largest element from the input, represented as it is in the input"

something like this

@ASCII-only updated

<s>foo</s> for strikethrough

Just did that ;-). I always mix up the chat one and the post one

~~ is discord/other markdown lol, --- is SE chat

I had tried both versions

APL (Dyalog Unicode), 12 bytes
(⌈/↑⍨⍬≢1↓∪)⎕

Try it online!
If there were no input requirements, it could just be ⌈/↑⍨⍬≢1↓∪ for 9 bytes.

Python 3.8 (pre-release), 45 44 bytes
if~-len(a:=set(eval(input()))):print(max(a))

Try it online!
First time golfing; I'm sure this can be improved.
Also a few months late to the party on this challenge, but whatever. xD

Gol><>, 36 bytes
TIE!tlK1}l4,MF={=}|{?;1W~2K(?$~lM|~h

4 bytes golfed off!!! I realized I was using some redundancies in there... next I think I can really make the part for checking if the array is equal smaller!
Try it online!
# Gol><>, 40 bytes
TIE!tlK1}l4,MF={S&}|{?;1W~2K(Q$~:|~lM|~h

Haha, I had my debug stuff in my previous answer, now this has golfed off 2 bytes, but I just realized how to make it even shorter
Try it online!

Thunno 2, 5 bytes
G$ạ?"

Attempt This Online!
Explanation
G$ạ?"  "# Implicit input
G       # Push the maximum
 $      # Push the input again
  ạ     # Is it all equal?
   ?    # If it is:
    "  "#  Push an empty string
        # Implicit output

TI-BASIC, 11 9 bytes
9 Bytes
If max(Ans≠max(Ans
max(Ans

Shaved 2 more bytes - implicit Disp on the final line and optimizing the condition. We instead get a single value from the input list in Ans with max( and check if it is not equal to all the other values of the list with Ans≠max(Ans. We then check if at least one of the elements in the list was different with another max( command. Ultimately this is the same number of tokens in the condition but it saves a byte by eliminating the 2 byte ΔList( command.
11 Bytes
If sum(0≠ΔList(Ans
Disp max(Ans

Takes an input list in Ans. The ΔList( command returns a list of the differences of the elements in the provided list. In TI-BASIC logic performed on lists returns a list with the operation performed on each element in that list, so 0≠ returns a list of 1s and 0s identifying if diffs of consecutive elements were 0 and therefore the elements were equal. By summing this list we identify whether all all elements were different to the next and therefore whether they were all different (we would need to sort the list first if trying to identify the number of different elements, but since we only care about whether they're all the same there's no need to sort). That whole chunk is used as the condition for whether to display the max of the input list in Ans. 11 bytes because the ΔList( command is a 2 byte token.

Runic Enchantments, 39 bytes
/u'!}R:'!=?\~or:}(\
\i|'<\   }n/ ;${;?/

Try it online!
Numbers have to be separated with | to be parsed from input correctly (using , causes the list to be read as a single number as , is the group separator and C# doesn't care where it's located in the string, it ignores all of them).
No possibility of removing the three spaces in the lower line, due to the loop entrance and exit locations.
Does have a limited stack size that can be processed (9 items) due to the mana cost of the sort command (and potential bleed from large stack size and low remaining mana). A slightly larger program can handle up to 14 items.

Actually, 9 bytes
;M@╔l1<óX

Try it online!
Actually parses comma-separated items as lists on input, so long as the items look like Python literals, so there is no overhead for the restrictive input format.
Explanation:
;M@╔l1<óX
;M         make a copy of the input, maximal element
  @╔       remove duplicates from other copy
    l1<    is 1 less than the length of the deduplicated list?
       ó   if so, immediately exit, without printing anything
        X  else, discard the length, and implicitly print the remaining stack element (the maximal element of the input list) at exit

Tcl, 88 bytes
proc M t {if [set f [lindex [set S [lsort -de [split $t ,]]] 0]]!=[lindex $S e] {set f}}

Try it online!

Tcl, 88 bytes — proc M t {expr [set f [lindex [set S [lsort -de [split $t ,]]] 0]]!=[lindex $S e]?$f:""} — Try it online!

Ruby, 39 bytes
a=eval gets
puts a.max if a.uniq.size>1

Takes an string-form array and prints the result.

Input should be taken as a string

Bash (coreutils), 28 bytes
sort -n|uniq|tail +2|tail -1

Input is a stream, one number on each line
tail +2 strips the first line, and the output is empty if it's the only line coming out from uniq, which squashes identical lines into one after sort.

Rust, 128 bytes
fn f(s:&str)->Option<u32>{let v=s.split(",").map(|a|a.parse::<u32>().unwrap());let x=v.clone().max();if v.min()==x{None}else{x}}

Try it online!

F#, 112 bytes
let m(c:string)=
 let n=c.Split ','|>Seq.map int
 if Seq.distinct n|>Seq.length=1 then None else Seq.max n|>Some

Try it online!
I get the feeling that it could be made smaller, but I can't quite see how...

Java (JDK), 238 bytes
Golfed
public static String max(String s){StringTokenizer st=new StringTokenizer(s,",");TreeSet<Integer>t=newTreeSet<>();while(st.hasMoreTokens()){t.add(Integer.parseInt(st.nextToken()));}if(t.first()=t.last())return "";return Integer.toString(t.last());}

Ungolfed
import java.util.StringTokenizer;
import java.util.TreeSet;

public class max {
    public static String max(String s) {
        StringTokenizer st = new StringTokenizer(s,",");
        TreeSet<Integer> t = new TreeSet<>();
        while (st.hasMoreTokens()) {
            t.add(Integer.parseInt(st.nextToken()));
        }
        if (t.first() == t.last()) return "";
    return Integer.toString(t.last());
    }
}

I have already seen this answer, but I still wanted to share my answer.

Hey! Few general tips for golfing in Java (especially 8+); You can use the lambda declaration to shave off almost all of the public static String max(String s) preamble, try and avoid using if expressions and use ternary operators instead, and any imports (e.g. import java.util.*) count towards your byte count, so avoid if possible! Anyway, check out this link for a whole load of tips and welcome to CodeGolf!

@LukeStevens Thanks for the tips! I will work on fixing this answer soon!

Ruby -aplF,, 38 bytes
$_=$F.uniq.one?? p: $F.map(&:to_i).max

Try it online!
I'm generally not a fan of extensively using command line switches, but since the I/O format is very rigid - here it goes.
The input is automatically (-a) split into an array $F using comma as a separator (-F,). If it contains only one unique element, we return nil, otherwise, the max value. Finally, the output written into $_ is implicitly printed (-p). The option -l isn't really necessary - it is only there to make empty outputs discernible by line breaks.
Update: Almost forgot that we don't automatically get integers from split, just strings, which brings more boilerplate...

V, 22 bytes
Ó,/ò
ún
Dç^"$/d
GYVHp

Try it online!
Hexdump:
00000000: d32c 2ff2 0afa 6e0a 44e7 5e12 2224 2f64  .,/...n.D.^."$/d
00000010: 0a47 5956 4870                           .GYVHp

Explanation:
Ó,/ò                Replace commas with new lines
ún                  Sort; cursor ends up in first line
D                   Delete line (smallest number)
 ç^<C-r>"$/d        Delete all lines that contain the same number
GYVHp               Go to last line, copy, select all, paste
                    If all numbers are equal, the buffer is empty and nothing will be copied,
                    resulting in an empty output

Perl 5 -n -M5.010, 54 bytes
use List::Util'/.+/';@n=split/,/;uniq(@n)>1&&say max@n

Try it online!

PHP, 57 bytes
<?=count(array_unique($a=split(",",$argn)))>1?max($a):"";

requires PHP<7; replace split with explode for current PHP (+2 bytes):
<?=count(array_unique($a=explode(",",$argn)))>1?max($a):"";

Run as pipe with -nR or try them online.

Ruby, 32 bytes
->l{eval(l).minmax.uniq[1,1]*''}

Try it online!

Scala (91 79 bytes):
def f(s:String){val i=s.split(",");if(i.toSet.size>1)print(i.map(_.toInt).max)}

Try it online

Java (JDK), 112 108 117 bytes
s->{return java.util.Arrays.stream(s.split(",")).mapToLong(Long::new).distinct().sorted().skip(1).max().getAsLong();}

Try it online!
Either returns a long or throws an exception, which presumably counts as not returning anything.
Edit: Fixed a bug that caused incorrect output if the maximum was the first element of the input. (+9 bytes)

Bash, 36 bytes
tr , \\n|sort -un|tail -n+2|tail -n1

takes input on stdin, outputs to stdout
$ echo 1,2,3 | ./f.sh
3
$ echo 1,1,1 | ./f.sh
$ echo 123,231,321,312 | ./f.sh
321

JavaScript (Node.js), 53 bytes
s=>(s=s.split`,`.sort((a,b)=>a-b))[0]-s.pop()?s[0]:''

Try it online!
Worse than Shaggy's

C (gcc), 86 bytes
a;g(){scanf("%d,",&a);}f(b,c){for(b=g(),c=a;~g();c=a>c?a:c)b&=a==c;b||printf("%d",c);}

Try it online!
Read stdin and write stdout


text:
Logic Gates Manually
Make a program that simulates the basic logic gates.
Input: An all-caps word followed by 2 1 digit binary numbers, separated by spaces, such as OR 1 0.  The gates OR, AND, NOR, NAND, XOR, and XNOR are needed.
Output: What the output of the entered logic gate would be given the two numbers: either 1 or 0.
Examples:
AND 1 0 becomes 0
XOR 0 1 becomes 1
OR 1 1 becomes 1
NAND 1 1 becomes 0
This is codegolf, so the shortest code wins.

Can we take in an array as input?

no @Quintec you cant

Can we output as True/False?

sure @xnor (also relevant username)

05AB1E, 13 12 10 8 bytes
ÇO₁*Ƶï%É

Port of @mazzy's alternative calculation mentioned in the comment on his Powershell answer (*256%339%2 instead of *108%143%2).
Try it online or verify all test cases.
Explanation:
Ç            # Convert each character in the (implicit) input to a unicode value
 O           # Sum them together
  ₁*         # Multiply it by 256
    Ƶï%      # Then take modulo-339
        É    # And finally check if it's odd (short for %2), and output implicitly

See this 05AB1E tip of mine (section How to compress large integers?) to understand why Ƶï is 339.

Python 2, 38 bytes
lambda s:sum(map(ord,s))*3%61%37%9%7%2

Try it online!
A good ol' modulo chain applied to the sum of ASCII values of the input string, making for a solution that's just overfitting. The total ASCII value is distinct for each possible input, except that those with 0 1 and 1 0 give the same result, which is works out because all the logic gates used are symmetric.
The *3 separates out otherwise-adjacent values for inputs that different only in the bits, since these make it hard for the mod chain to split up. The length and size of numbers in the mod chain creates roughly the right amount of entropy to fit 18 binary outputs.
A shorter solution is surely possible using hash(s) or id(s), but I avoided these because they are system-dependent.

Python 2, 50 bytes
lambda s:'_AX0NRD'.find((s*9)[35])>>s.count('0')&1

Try it online!
A slightly more principled solution. Each logic gate gives a different result for each count of zeroes in the input, encodable as a three-bit number from 1 to 6. Each possible logic gate is mapped to the corresponding number by taking (s*9)[35], which are all distinct. For OR, this winds up reading one of the bits so the character could be 0 or 1, but it turns out to work to check if it's 0, and a 1 will correctly give a 1 result anyway.

Damn, I was looking for my own mod values, but you beat me to it. Have you written down your strategies for this anywhere, cos my brute force methods tend to take a very long time

@JoKing I did basically total brute force on *a%b%c%d%e%2, nothing really clever. The only interesting thing was putting a * before the mods; I didn't try other formats.

Wow that's just mind-boggling! I don't even expect a hash-like method to do that. May I make a 45-byte JS port of your answer ?

@ShieruAsakoto Definitely, go for it.

@xnor I used the exact same method as you did, so I wouldn't feel okay posting it on my own, but this can be 36 bytes.

JavaScript (ES6), 39 bytes
s=>341139>>parseInt(btoa(s),34)%86%23&1

Try it online!
How?
We can't parse spaces with parseInt(), no matter which base we're working with. So we inject a base-64 representation of the input string instead. This may generate = padding characters (which can't be parsed with parseInt() either), but these ones are guaranteed to be located at the end of the string and can be safely ignored.
We parse as base \$34\$ and apply a modulo \$86\$, followed by a modulo \$23\$, which gives the following results. This includes inaccuracies due to loss of precision. The final result is in \$[0..19]\$, with the highest truthy index being at \$18\$, leading to a 19-bit lookup bitmask.
 input      | to base-64     | parsed as base-34 | mod 86 | mod 23 | output
------------+----------------+-------------------+--------+--------+--------
 "AND 0 0"  | "QU5EIDAgMA==" |  1632500708709782 |   26   |    3   |    0
 "AND 0 1"  | "QU5EIDAgMQ==" |  1632500708709798 |   42   |   19   |    0
 "AND 1 0"  | "QU5EIDEgMA==" |  1632500708866998 |   34   |   11   |    0
 "AND 1 1"  | "QU5EIDEgMQ==" |  1632500708867014 |   50   |    4   |    1
 "OR 0 0"   | "T1IgMCAw"     |     1525562056532 |   52   |    6   |    0
 "OR 0 1"   | "T1IgMCAx"     |     1525562056533 |   53   |    7   |    1
 "OR 1 0"   | "T1IgMSAw"     |     1525562075028 |   58   |   12   |    1
 "OR 1 1"   | "T1IgMSAx"     |     1525562075029 |   59   |   13   |    1
 "XOR 0 0"  | "WE9SIDAgMA==" |  1968461683492630 |   48   |    2   |    0
 "XOR 0 1"  | "WE9SIDAgMQ==" |  1968461683492646 |   64   |   18   |    1
 "XOR 1 0"  | "WE9SIDEgMA==" |  1968461683649846 |   56   |   10   |    1
 "XOR 1 1"  | "WE9SIDEgMQ==" |  1968461683649862 |   72   |    3   |    0
 "NAND 0 0" | "TkFORCAwIDA=" | 61109384461626344 |   62   |   16   |    1
 "NAND 0 1" | "TkFORCAwIDE=" | 61109384461626350 |   70   |    1   |    1
 "NAND 1 0" | "TkFORCAxIDA=" | 61109384461665650 |   64   |   18   |    1
 "NAND 1 1" | "TkFORCAxIDE=" | 61109384461665656 |   72   |    3   |    0
 "NOR 0 0"  | "Tk9SIDAgMA==" |  1797025468622614 |   76   |    7   |    1
 "NOR 0 1"  | "Tk9SIDAgMQ==" |  1797025468622630 |    6   |    6   |    0
 "NOR 1 0"  | "Tk9SIDEgMA==" |  1797025468779830 |   84   |   15   |    0
 "NOR 1 1"  | "Tk9SIDEgMQ==" |  1797025468779846 |   14   |   14   |    0
 "XNOR 0 0" | "WE5PUiAwIDA=" | 66920415258533864 |    0   |    0   |    1
 "XNOR 0 1" | "WE5PUiAwIDE=" | 66920415258533870 |    8   |    8   |    0
 "XNOR 1 0" | "WE5PUiAxIDA=" | 66920415258573170 |    2   |    2   |    0
 "XNOR 1 1" | "WE5PUiAxIDE=" | 66920415258573176 |   10   |   10   |    1

:o shorter than the ported answer

But... it seems not working for NOR?

@ShieruAsakoto Thanks for noticing. I just forgot NOR. Now fixed.

CJam (13 bytes)
q1bH%86825Yb=

Assumes that input is without a trailing newline.
Online test suite
This is just a simple hash which maps the 24 possible inputs into 17 distinct but consistent values and then looks them up in a compressed table.
Python 2 (36 bytes)
lambda s:76165>>sum(map(ord,s))%17&1

This is just a port of the CJam answer above. Test suite using xnor's testing framework.

Perl 6, 20 bytes
*.ords.sum*108%143%2

Try it online!
A port of maddy's approach. Alternatively, *256%339%2 also works.
Perl 6, 24 bytes
*.ords.sum*3%61%37%9%7%2

Try it online!
A port of xnor's answer. I'll have a go at finding a shorter one, but I think that's probably the best there is.

Jelly, 13 10 bytes
OSị“ʋN’BŻ¤

Try it online!
Port of Peter Taylor's answer.

9 bytes by creating a port of @mazzy's Powershell answer (*256%339%2).

@KevinCruijssen Ah, wasn't there to notice the new algorithm, thanks.

Charcoal, 32 bytes
§01÷⌕⪪”＆⌈4Ｙ⍘ＬH⦄vü|⦃³Ｕ}×▷” Ｓ∨⁺ＮＮ⁴

Try it online! Link is to verbose version of code. Explanation: The compressed string expands to a list of the supported operations so that the index of the given operation is then shifted right according to the inputs and the bit thus extracted becomes the result.
XOR     001
AND     010
OR      011
NOR     100
NAND    101
XNOR    110
inputs  011
        010

74-byte version works for all 16 binary operations, which I have arbitrarily named as follows: ZERO AND LESS SECOND GREATER FIRST XOR OR NOR XNOR NFIRST NGREATER NSECOND NLESS NAND NZERO.
§10÷÷⌕⪪”＆↖VρＳ´↥cj/v⊗J[Rf↓⪫？9ＫO↘Ｙ⦄;↙W´Ｃ>η=⁴⌕✳AＫＸIＢ｜⊖\`⊖:Ｂ�Ｊ/≧vF@$h⧴” Ｓ∨Ｎ²∨Ｎ⁴

Try it online! Link is to verbose version of code.

+1 Rather impressed with the full 16 operations program!

J, 21 bytes
2|7|9|37|61|3*1#.3&u:

Try it online!
Port of xnor's Python 2 solution.

J, 30 bytes
XNOR=:=/
NAND=:*:/
NOR=:+:/
".

Try it online!
Some bit of fun with eval ". and standard library (which already includes correct AND, OR, XOR).

J, 41 bytes
({7 6 9 8 14 1 b./)~1 i.~' XXNNA'E.~_2&}.

Try it online!
More J-style approach.
How it works
A very general J trick is hidden here. Often, the desired function has the structure "Do F on one input, do H on the other, and then do G on both results." Then it should operate like (F x) G H y. In tacit form, it is equivalent to (G~F)~H:
x ((G~F)~H) y
x (G~F)~ H y
(H y) (G~F) x
(H y) G~ F x
(F x) G H y

If G is an asymmetric primitive, just swap the left and right arguments of the target function, and we can save a byte.
Now on to the answer above:
({7 6 9 8 14 1 b./)~1 i.~' XXNNA'E.~_2&}.

1 i.~' XXNNA'E.~_2&}.  Processing right argument (X): the operation's name
                _2&}.  Drop two chars from the end
1 i.~' XXNNA'E.~       Find the first match's index as substring
                       Resulting mapping is [OR, XOR, XNOR, NOR, NAND, AND]

7 6 9 8 14 1 b./  Processing left argument (Y): all logic operations on the bits
7 6 9 8 14 1 b.   Given two bits as left and right args, compute the six logic functions
               /  Reduce by above

X{Y  Operation on both: Take the value at the index

Consider posting the trick into the J tips for golfing if you haven’t already. Neat stuff. Also I’m a big fan of the eval solution.

Mathematica, 55 bytes
Symbol[ToCamelCase@#][#2=="1",#3=="1"]&@@StringSplit@#&

Pure function. Takes a string as input and returns True or False as output. Since Or, And, Nor, Nand, Xor, and Xnor are all built-ins, we use ToCamelCase to change the operator to Pascal case, convert it to the equivalent symbol, and apply it to the two arguments.

Powershell, 36 34 bytes
Inspired by xnor, but the sequence *108%143%2 is shorter then original *3%61%37%9%7%2
$args|% t*y|%{$n+=108*$_};$n%143%2

Test script:
$f = {

 $args|% t*y|%{$n+=108*$_};$n%143%2
#$args|% t*y|%{$n+=3*$_};$n%61%37%9%7%2   # sequence by xnor

}

@(
    ,("AND 0 0", 0)
    ,("AND 0 1", 0)
    ,("AND 1 0", 0)
    ,("AND 1 1", 1)
    ,("XOR 0 0", 0)
    ,("XOR 0 1", 1)
    ,("XOR 1 0", 1)
    ,("XOR 1 1", 0)
    ,("OR 0 0", 0)
    ,("OR 0 1", 1)
    ,("OR 1 0", 1)
    ,("OR 1 1", 1)
    ,("NAND 0 0", 1)
    ,("NAND 0 1", 1)
    ,("NAND 1 0", 1)
    ,("NAND 1 1", 0)
    ,("NOR 0 0", 1)
    ,("NOR 0 1", 0)
    ,("NOR 1 0", 0)
    ,("NOR 1 1", 0)
    ,("XNOR 0 0", 1)
    ,("XNOR 0 1", 0)
    ,("XNOR 1 0", 0)
    ,("XNOR 1 1", 1)

) | % {
    $s,$e = $_
    $r = &$f $s
    "$($r-eq$e): $s=$r"
}

Output:
True: AND 0 0=0
True: AND 0 1=0
True: AND 1 0=0
True: AND 1 1=1
True: XOR 0 0=0
True: XOR 0 1=1
True: XOR 1 0=1
True: XOR 1 1=0
True: OR 0 0=0
True: OR 0 1=1
True: OR 1 0=1
True: OR 1 1=1
True: NAND 0 0=1
True: NAND 0 1=1
True: NAND 1 0=1
True: NAND 1 1=0
True: NOR 0 0=1
True: NOR 0 1=0
True: NOR 1 0=0
True: NOR 1 1=0
True: XNOR 0 0=1
True: XNOR 0 1=0
True: XNOR 1 0=0
True: XNOR 1 1=1

Your *16%95%7%2 fails for the XNOR cases, though. You could use @nedla2004's *6%68%41%9%2, which is 2 bytes shorter than @xnor's one, though.

Thanks!!!! I've added xnor. I think that *108%143 is more attractive :) In addition, there is a nice pair *256%339. This pair is even better for languages that know how to work with bits and bytes.

Ah nice! A port from your answer saves 2 bytes in my Java answer as well. :) And it's a 10-bytes alternative for my 05AB1E answer by using *256%339.

Java 10, 30 28 bytes
s->s.chars().sum()*108%143%2

Port of @mazzy's Powershell answer.
Try it online.

JavaScript (Node.js), 106 94 bytes
x=>([a,c,d]=x.split` `,g=[c&d,c^d,c|d]["OR".search(a.slice(1+(b=/N[^D]/.test(a))))+1],b?1-g:g)

Try it online!
Link to the code and all 24 cases.
+9 for forgotten to map the XNOR case.

maybe I'm not seeing something, but where to I type the input?  The input tab does nothing.

@qazwsx This is a lambda function, which by default is allowed.

@qazwsx The link shows the outputs for every possible input. This answer is a function, so if you want to manually test it, you can replace the footer with e.g. console.log(f("AND", 1, 1));

@qazwsx And please revert the downvote. This is not invalid after all.

oh I see.  i reverted the downvote

When I inputed that, it returned 0 when it should have returned 1.  In fact, its returning the opposite for everything.

@qazwsx I think that is not the case? My test cases shouldn't be lying

JavaScript (Node.js), 45 bytes
Just a port of xnor's superb Python 2 answer posted upon consent, please give that answer upvotes instead of this.
x=>Buffer(x).reduce((a,b)=>a+b)*3%61%37%9%7%2

Try it online!

43 bytes with @nedla2004's alternative modulos.

Or a 43 bytes alternative with a port of @PeterTaylor's Python s answer.

Maybe a good idea to convert this to a community answer first? Then add those JS ports as a collection here.

Perhaps. Not sure. I usually just add multiple answers if there are multiple alternatives with the same byte-count. mazzy's Powershell answer even found a shorter one though: 41 bytes.

Attache, 55 bytes
{Eval!$"${Sum!Id''Downcase!SplitAt!_}${N=>__2}"}@@Split

Try it online!
A rather brutish solution. Converts the input to the relevant Attache command and evaluates it. (Attache has built-ins for each of the 6 logic gates.)

Ruby, 20 bytes
->s{76277[s.sum%17]}

Try it online!
How it works:
Basically the same as Peter Taylor's answer, but Ruby makes it easier. The magic number is different but the idea was the same.

source: Stack Exchange

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

sort: votes


text:
Length of a UTF-8 byte sequence
Determine the length of a UTF-8 byte sequence given its first byte. The following table shows which ranges map to each possible length:
  Range    Length
---------  ------
0x00-0x7F    1
0xC2-0xDF    2
0xE0-0xEF    3
0xF0-0xF4    4

Notes on gaps in the table: 0x80-0xBF are continuation bytes, 0xC0-0xC1 would start an overlong, invalid sequence, 0xF5-0xFF would result in a codepoint beyond the Unicode maximum.
Write a program or function that takes the first byte of a UTF-8 byte sequence as input and outputs or returns the length of the sequence. I/O is flexible. For example, the input can be a number, an 8-bit character or a one-character string. You can assume that the first byte is part of a valid sequence and falls into one of the ranges above.
This is code golf. The shortest answer in bytes wins.
Test cases
0x00 => 1
0x41 => 1
0x7F => 1
0xC2 => 2
0xDF => 2
0xE0 => 3
0xEF => 3
0xF0 => 4
0xF4 => 4

Is an input of a list of the 8 bits acceptable?

@JonathanAllan No, that would be taking flexible I/O too far.

Forth, 6 bytes
x-size

see https://forth-standard.org/standard/xchar/X-SIZE
Input and output follows a standard Forth model:
Input
Memory address + length (i.e. 1) of a single-byte UTF-8 "string".
Output
UTF-8 sequence length in bytes.
Sample Code
Store 0xF0 in a memory cell, and invoke x-size:
variable v
0xF0 v !
v 1 x-size

Check the result:
.s <1> 4  ok

Assuming this works in https://tio.run/#forth-gforth, could you show an example? I don't understand how you could have a single-byte UTF-8 string if the byte is 0xF0.

could you show an example? I don't understand how you could have a single-byte UTF-8 string if the byte is 0xF0.

I've added some sample code demonstrating how to do it.
Unfortunately, the TIO version of gforth does not seem to support the Unicode words (according to "see x-size", it is just hard-coded to return 1 there).

I see. That's not what I'd call an UTF-8 string though, as F0 alone is an invalid byte sequence, as far as UTF-8 is concerned.

as F0 alone is an invalid byte sequence

True (that's why I've put the word "string" in quotes), but this task is specifically about recognizing the sequence by it's first byte, and Forth does not really care for it being invalid, which makes this solution possible, in turn.

Z80Golf, 19 14 bytes
00000000: 2f6f 3e10 37ed 6a3d 30fb ee07 c03c       /o>.7.j=0....<

Try it online!
-5 bytes thanks to @Bubbler
Example with input 0x41-Try it online!
Assembly
Example with input 0xC2-Try it online!
Example with input 0xE0-Try it online!
Example with input 0xF4-Try it online!
Assembly:
;input: register a
;output: register a
byte_count:			;calculate 7^(log2(255^a))||1
	cpl			;xor 255
	ld l,a
	log2:
		ld	a,16
		scf
	log2loop:
		adc	hl,hl
		dec	a
		jr	nc,log2loop
	xor 7
	ret nz
	inc a

Try it online!

Use Bash TIO to work with assembly, with easier-to-see examples. The link also has 15-byte version of your solution. Here are the improvements: xor 0xff -> cpl, no need to or a, jr nz, return -> ret nz, ld a,1 -> inc a.

C (gcc), 39 bytes
t(char x){x=(__builtin_clz(~x)-24)%7u;}

Try it online!

Why char and not int?

@R.. Because they get sign extended. For example ~(char)0xF0 == ~(int)0xFFFFFFF0 (assume char = signed char, sizeof(int) == 4)

Ah, assuming char is signed.

You can save five bytes by leaving out the char  and just passing chars in when you call it.

Jelly,  8  7 bytes
+⁹BIITḢ

A monadic link accepting the byte as an integer.
Try it online! Or see all inputs evaluated.
If an input of a list of the 8 bits were acceptable then the method is only 6 bytes: 1;IITḢ, however it has been deemed as talking flexible I/O too far.
How?
+⁹BIITḢ - Link: integer       e.g.: 127 (7f)            223 (df)            239 (ef)            244 (f4)
 ⁹      - literal 256
+       - add                       383                 479                 495                 500
  B     - to a list of bits         [1,0,1,1,1,1,1,1,1] [1,1,1,0,1,1,1,1,1] [1,1,1,1,0,1,1,1,1] [1,1,1,1,1,0,1,0,0]
   I    - increments                [-1,1,0,0,0,0,0,0]  [0,0,-1,1,0,0,0,0]  [0,0,0,-1,1,0,0,0]  [0,0,0,0,-1,1,-1,0]
    I   - increments                [2,-1,0,0,0,0,0]    [0,-1,2,-1,0,0,0]   [0,0,-1,2,-1,0,0]   [0,0,0,-1,2,-2,1]
     T  - truthy indices            [1,2]               [2,3,4]             [3,4,5]             [4,5,6,7]
      Ḣ - head                      1                   2                   3                   4

Haskell, 28 bytes
f x=sum[1|y<-"Áßï",x>y]+1

Try it online!

Jelly, 8 7 bytes
»Ø⁷Ba\S

Try it online!
How it works
»Ø⁷Ba\S  Main link. Argument: n (integer)

 Ø⁷      Yield 128.
»        Take the maximum of n and 128.
   B     Yield the array of binary digits.
    a\   Cumulatively reduce by AND, replacing 1's after the first 0 with 0's.
      S  Take the sum.

Python 2, 28 bytes
lambda x:1.4**(x/16-11)//1+1

Try it online!

JavaScript (Node.js), 24 bytes
x=>7^Math.log2(255^x)||1

Try it online!

Ruby, 27 23 bytes
->x{2+x[7]+(x/16<=>14)}

Try it online!

Charcoal, 12 bytes
Ｉ⌕⍘⌈⟦Ｎ¹²⁸⟧²0

Try it online! Link is to verbose version of code. Explanation:
     Ｎ          Input number
      ¹²⁸       Literal 128
   ⌈⟦    ⟧      Take the maximum
  ⍘       ²     Convert to base 2 as a string
 ⌕         0    Find the position of the first `0`
Ｉ               Cast to string
                Implicitly print

05AB1E, 8 7 bytes
žy‚àb0k

Port of @Neil's Charcoal answer.
-1 byte thanks to @Grimy.
Input as integer.
Try it online or verify all test cases.
Explanation:
žy       # Push 128
  ‚      # Pair it with the (implicit) input-integer
   à     # Take the maximum of this pair (128 and input)
    b    # Convert it to a binary-string
     0k  # Get the 0-based first index of a "0" in this binary-string
         # (and output it implicitly as result)

s) to ‚ for 7. Porting the other Jelly answer gives another 8: ₁+b¥η€ËO

@Grimy No idea why I didn't had ‚ in the first place.. :S But thanks for -1.

Jelly, 7 bytes
»Ø⁷Bi0’

Port of my 05AB1E answer.
Try it online or verify all test cases.
Explanation:
 Ø⁷        # Push 128
»          # Take the max of 128 and the input
   B       # Convert it to binary
    i0     # Get the 1-indexed first index of a 0
      ’    # Decrease it by 1 to make it 0-indexed (and output it implicitly)

Perl 6, 18 bytes
{7-msb(255-$_)||1}

Try it online!
Port of user202729's JavaScript answer. Alternatives with WhateverCode:
(255-*).msb*6%34%7
-(255-*).msb%6%5+1

x86 Assembly, 11 bytes
00000000 <f>:
   0:   f6 d1                   not    %cl
   2:   0f bd c1                bsr    %ecx,%eax
   5:   34 07                   xor    $0x7,%al
   7:   75 01                   jne    a <l1>
   9:   40                      inc    %eax
0000000a <l1>:
   a:   c3                      ret

Try it online!
Port of user202729's JavaScript answer. Uses fastcall conventions.

Labyrinth, 35 bytes
? @!1 16/ )!@!
:   ";_ _3&""2
_128&

Try it online!
Unwrapped version of the code:
?:_128&1!@
      ;
      _16/_3&2!@
            )
            !
            @

You're missing an ! on the third line, which means doesn't print anything for inputs below 128

Labyrinth, 28 bytes
1?:_128/}:_224/}_240/{{+++!@

Try it online!
Routing is pretty hard and also takes a lot of bytes, so I figured I'd just make a linear program. Basically computes 1 + n/128 + n/224 + n/240, where / is floor division.

The 1+ can just be )

C, 31 bytes
f(x){return(x-160>>20-x/16)+2;}

Try it online!
27 bytes with gcc (-O0)
f(x){x=(x-160>>20-x/16)+2;}

Alternatives, 31 and 33 bytes
f(x){return(10>>15-x/16)+7>>2;}
f(x){return x/128-(-3>>15-x/16);}

I found these expressions when playing around with the Aha! superoptimizer a few years ago.

Zsh, 42 bytes
>$1
eval ';od>><'{,194,224,240}-\>
wc -l<*

Try it online!
Input as a decimal integer.

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


text:
Amidakuji (阿弥陀籤) simplification
If you have ever had any exposure to Japanese or East Asian culture you will have surely encountered the Amidakuji game:

As Wikipedia explains, it is a type of lottery drawn on paper and used to randomly select a permutation of N items.
For example, it may be used to randomly assign a starting sequence to N people, or N prizes to N people, and so on.
The trick to understanding why the game represents a permutation is to realize that every horizontal stroke (called a "leg") swaps its two items in place.
The same Wikipedia page also explains that each permutation P of N items corresponds to an infinite number of Amidakuji diagrams. The one(s) with the least number of horizontal strokes (legs) are called the "primes" of that particular permutation P.
Your task is to receive an Amidakuji diagram with 2 or more vertical lines (in this example they are 6) in this format (minus the letters):
A B C D E F
| | | | | |
|-| |-| |-|
| |-| |-| |
| | | | |-|
| |-| |-| |
| | |-| |-|
| | |-| | |
|-| | |-| |
|-| |-| | |
| |-| | |-|
| | | | | |
B C A D F E

And produce one of its primes (again, minus the letters):
A B C D E F
| | | | | |
|-| | | |-|
| |-| | | |
| | | | | |
B C A D F E

The first and last lines with the letters are not part of the format. I have added them here to show the permutation. It is also not required that the first or last lines contain no legs |-|, nor that the output be as compact as possible.
This particular input example is one of the (infinite) ASCII representations of the Amidakuji diagram at the top of the Wikipedia page.
There is one non-obvious rule about these ASCII diagrams: adjacent legs are forbidden.
|-|-|  <-  NO, this does not represent a single swap!

Wikipedia explains a standard procedure to obtain a prime from a diagram, called "bubblization", which consists of applying the following simplifications over and over:
1) Right fork to left fork:
| |-|      |-| |
|-| |  ->  | |-|
| |-|      |-| |

2) Eliminating doubles:
|-|        | |
|-|   ->   | |

I am not sure whether that explanation is unambiguous. Your code may use that technique or any other algorithm that produces the required primes.
Shortest code wins.
Standard rules and standard allowances apply. (If the input is not valid, your program may catch fire. Input/output formats may be stdin/stdout, string argument, list of lines, matrix of chars, whatever works best for you, etc.)

This is a very interesting challenge. I might take a while producing an ungolfed solution, heh.

Does the output need to be as compact as possible or is any amount of vertical space allowed as long as the number of legs is minimal?

@Laikoni any amount of vertical space is allowed.

Do bubblization and inverse bubblization reach every same result Amidakuji ?

@l4m2 what is inverse bubblization?

@Tobia insert doubles

Python 2, 322 240 bytes
def f(X):
 X=[[c>' 'for c in s.split('|')]for s in X.split('\n')];h=L=len(X[0])-1;p=range(L)
 for x in X:p=[a-x[a]+x[a+1]for a in p]
 while h:h=i=0;exec"if p[i]>p[i+1]:print'|'+i*' |'+'-|'+(L-i-2)*' |';h=p[i],p[i+1]=p[i+1],p[i]\ni+=1\n"*~-L

Try it online!
A function which takes the string in the specified form, and prints out the reduced Amidakuji in that form as well.
The basic idea here is to first convert the input into a permutation (in the for x in X loop); and then in the while loop, perform a bubble sort of that permutation, since as the wikipedia article notes, this results in a 'prime' Amidakuji.

Wow. I just spent a long time making a Python 3 version, but it's 526 bytes, heh.

I just fed hundreds of random diagrams to your code and I can confirm that it outputs correct primes!

Haskell, 288 bytes
p x(_:[])=x
p(x:y:z)(_:b:c)|b=='-'=y:p(x:z)c|0<1=x:p(y:z)c
c 0='-'
c _=' '
_#1="|"
m#n='|':c m:(m-1)#(n-1)
p?q=(p:fst q,snd q)
f%b|b==f b=b|0<1=f%f b
f l=reverse$snd$(g 0)%(foldl p[1..n]l,[])where n=1+div(length$l!!0)2;g b((x:y:z),a)|x>y=y?g(b+1)(x:z,a++[b#n])|0<1=x?g(b+1)(y:z,a);g _ x=x

Try it online!
Explanation
-- the function p performs the permutation of a list
-- according to a single line from amidakuji board
p x (_:[]) = x
p (x:y:z) (_:b:c)
    | b == '-' = y : p (x : z) c
    | otherwise = x : p (y : z) c

-- helper to select either leg '-' or empty cell
c 0 = '-'
c _ = ' '

-- the # operator generates an amidakuji line containing one leg
-- which corresponds to one swap during bubble sort

-- terminal case, just one edge left
_ # 1 = "|"
-- each cell contains an edge '|' and either space or a '-' for the "active" cell
m # n = '|' : c m : (m - 1) # (n - 1)

-- helper to find the limit value of a function iteration
f % b
    | b == f b = b  -- return the value if it is unchanged by the function application
    | otherwise = f % f b -- otherwise repeat

-- helper to appropriately combine q which is the result of invocation of
-- the function g (see below), and a character p
p ? q = (p : fst q, snd q)

-- the function that does the work
f l = reverse $ snd $ (g 0) % (foldl p [1..n] l, []) where
    -- number of lines on the board
    n = 1 + div (length $ l !! 0) 2
    -- apply one iteration of bubble sort yielding (X, Y)
    -- where X is partially sorted list and Y is the output amidakuji
    g b ((x:y:z), a)
        -- if we need to swap two elements, do it and add a line to our board
        | x > y = y ? g (b + 1) (x:z, a ++ [b # n])
        -- if we don't need to, just proceed further
        | otherwise = x ? g (b + 1) (y:z, a)
    -- terminal case when there is only one element in the list
    g _ x = x

Good job! I fed 1000s of random diagrams to your code and it solved them all.

(_:[]) can be just [_] and p?q=(p:fst q,snd q) can be p?(f,s)=(p:f,s).  Instead of defining c 0='-';c _=' '; and then using c m, " -"!!(0^abs m) should work.

(g 0) does not need  brackets and a let in a guard is shorter than where. All together 274 bytes: Try it online!

Your fixpoint function % can be inlined with until(\x->g 0 x==x)(g 0).

Retina 0.8.2, 105 bytes
$
¶$%`
r`.?.\G
 1$.'$*
+r-1=`\|(-?.?[- 1]*¶.*)(1+)
$2$1
-

1G`
;{`\b(1+) \1
$1-$1
*`1+
|
(1+)-(1+)
$2 $1

Try it online! Explanation:
$
¶$%`

Duplicate the last line.
r`.?.\G
 1$.'$*

Number the columns in the last line.
+r-1=`\|(-?.?[- 1]*¶.*)(1+)
$2$1

Move the numbers up until they get to the first line. At each iteration, only the rightmost number -1= is moved. It is moved to the rightmost | unless it is preceded by a - in which case it is moved to the previous |. (The r indicates that the regex is processed as if it was a lookbehind, which makes it marginally easier to match this case.) This calculates the permutation that the Amidakuji transforms into sorted order.
-

1G`

Keep just the list of numbers, deleting the -s and anything after the first line.
;{`

The rest of the program then is then repeated sort the list back into order, but the final list is not printed, however as it takes an iteration for Retina 0.8.2 to notice that the list is in order, a line with no legs is generated at the end, which I believe is acceptable.
\b(1+) \1
$1-$1

Mark all available pairs of adjacent unsorted numbers with -s for the legs.
*`1+
|

Print the legs but with the numbers replaced with |s.
(1+)-(1+)
$2 $1

Actually perform the swaps.

Do you have any advice on how to run your code with Retina.exe? I think I have the correct source (105 bytes) but it outputs nothing. I tried the Hello World from the Retina examples and it works. Can you upload the source somewhere, or Base64 encode it and put it in a pastebin, in case I got the encoding wrong?

@Tobia Sorry, but I can't remember how to use Retina.exe; I think I might have used it once or twice but these days I just use Try It Online.

LOL I'm dumb! I was using some cutting-edge version instead of 0.8.2. Now I got my harness to fed hundreds of random diagrams to your code and I can confirm that it always outputs the correct primes. Good job!

@Tobia Thanks for testing! Tweaks needed for Retina 1: $* → *; -1= → 0; 1 → _; ; → . (roughly); * → *\.

Python 3, 524 488 486 bytes
-38 bytes thanks to ovs!
from numpy import*
A=array;E=array_equal
K=[0]
def r(a,m,n):
	X=len(m);Y=len(m[0]);W,H=a.shape
	for x in range(W-X+1):
		for y in range(H-Y+1):
			if E(a[x:x+X,y:y+Y],A(m)):a[x:x+X,y:y+Y]=A(n)
	return a
def p(a):
	b=A([[j>" "for j in i]for i in[i.split("|")for i in a.split("\n")]])
	while E(a,b)<1:a=b;Z=K*3;O=[0,1,0];T=[K+O,O+K]*2;D=[O,O],[Z,Z];P=[Z,O],[O,Z];*R,_=T;_,*L=T;b=r(r(r(r(r(r(a[any(a,1)],R,L),*D),*P),L,R),*D),*P)
	for i in a:print("",*[" -"[j]for j in i[1:-1]],"",sep="|")

Try it online!
This converts the Amidakuji to a 2D binary array, and directly reduces it using the rules.

I'm curious about your approach; I'll take a look! In the meantime, you can save some bytes by replacing " "+i.replace("|","")+" " with i.split("|") in . the first line of your p function...

A few more standard python golfing tweaks to get it to 479 bytes.

Looks like my algorithm is suboptimal...

Yah, not sure why that's happening...

Not always...sometimes right-fork to left-fork isn't doable, but left-fork to right-fork is. In that specific case, it's just a matter of doing the opposite there. Perhaps I need to do both?

524 bytes and it works...it's ugly, though.

Well, it's still shorter than your initial attempt :).

Sure, by two bytes. Gee, I thought this challenge would be way simpler.

@JosiahRyanW I don't think you have to do the opposite. Rather, you should add more vertical space whenever needed (or convert to an internal representation that doesn't use vertical space.) Here is the output in the failing example you posted: it still had 3 right forks and a double: https://pastebin.com/QFHBLjXg

With my representation, I think doing the opposite was easiest. I honestly don't think I attacked this in the right way; this is how I would do it if I were simply doing normal code.

Some changes I made: a[~all(a<1,axis=1)] to a[any(a,1)], store things that were used multiple times (like a.shape) in variables and use prints sep argument instead of str.join.

Another eight bytes with _,*L=*R,_=[K+O,O+K]*2 (remove T=...).

I wrote a test harness to feed random diagrams and check the answers. Yours seems to fail to find the prime in some cases. Here is one example: https://pastebin.com/iMudj29b

I give up. I officially don't really have an easy way to do this anymore.

Stax, 45 bytes
⌐φ²MC½↕uö∩┴║%≤Oo╧i╕ïô§ê{δ¿k>┴ê◘►╢lµ∙→Z↔8╨─(·£

Run and debug it


text:
Multiplicative undelta
Let us define the "multiplicative deltas" of values \$[\; a_0, \cdots a_N, \;]\$ as:
$$
[\; a_1 / a_0, \cdots, a_{i+1} / a_i, \cdots, a_N / a_{N-1} \;]
$$
The reverse operation - namely "multiplicative undelta" - returns values such that the above operation results in the given values.
Example
Given values \$[\; 1, 5, 3, 2 \;]\$ a general solution to the "multiplicative undelta" operation is:
$$
[\;
 a_0,
 \quad \underset{a_1}{\underbrace{a_0 \cdot 1}},
 \quad \underset{a_2}{\underbrace{a_1 \cdot 5}},
 \quad \underset{a_3}{\underbrace{a_2 \cdot 3}},
 \quad \underset{a_4}{\underbrace{a_3 \cdot 2}}
 \;]
$$
A particular solution can be obtained by setting \$a_0\$ to any value other than zero, for example by setting \$a_0 := 1 \$ we would get:
$$
[\; 1, 1, 5, 15, 30 \;]
$$
Challenge
Your task for this challenge is to implement the operation "multiplicative undelta" as defined above.
Rules
Inputs are:

a non-zero value \$a_0\$
a non-empty list/array/vector/... of non-zero "multiplicative deltas"

Output is a list/array/vector/... of values such that the first element is \$a_0\$ and for which the "multiplicative deltas" are the input.
Note: If your language has no support of negative integers you may replace non-zero by positive.
Test cases
2 [21] -> [2,42]
1 [1,5,3,2] -> [1,1,5,15,30]
-1 [1,5,3,2] -> [-1,-1,-5,-15,-30]
7 [1,-5,3,2] -> [7,7,-35,-105,-210]
2 [-12,3,-17,1311] -> [2,-24,-72,1224,1604664]
-12 [7,-1,-12,4] -> [-12,-84,84,-1008,-4032]
1 [2,2,2,2,2,2,2,2] -> [1,2,4,8,16,32,64,128,256]

May we take a single list of length 1+number of deltas, where the first item is a₀?

@Adám: I'm gonna say no to that because it would change things for existing answers.

Haskell, 8 bytes
scanl(*)

Try it online!

I was checking if anyone wrote this, and I thought noone wrote it and I said "cool, then I'll write" and then saw your answer at the bottom of the page. upvoted.

APL(Dyalog), 3 bytes
×\∊

Try it online!
If I have to take the number on the left and the array on the right:
-2 thanks to @H.PWiz
7 5 3 bytes
×\,

⊣,⊢ can just be ,

@H.PWiz thanks, my tacit is extremely weak

You don't need the parens; ×\, evaluates to a function.

@Dennis Doesn't seem to work unfortunately

You don't need to count the parens, because they're not needed in some situations. f←×\ works, for example. Btw, the (-12 3 -17 1311) in your permalink should be (¯12 3 ¯17 1311).

@Dennis I'm not really sure on this, but if it only works when defined as a function then wouldn't you need to include that definition in the bytecount, keeping it at 5?

It has to work as a function (or a full program) to be valid. Snippets aren't allowed as submissions.

Dennis is most probably trying to say that anonymous functions are allowed (they are). Parentheses are unnecessary; for example, we don't wrap Python lambdas in parentheses, they're not needed, similarly for Dyalog. Sure, lambda x:x+1(7) won't return 8 in Python, and (lambda x:x+1)(7) will, but f=lambda x:x+1 and then f(7) will return 8; the parentheses aren't part of the function. Note that this doesn't hold true for the {} (i.e. the lambda: part in Python) around dfns.

@EriktheOutgolfer Got it, thanks.

R, 15 bytes
cumprod(scan())

Try it online!
Full program. Function is longer (unless we were allowed to "glue" the inputs together, so that built-in cumprod would suffice as a complete answer):
R, 28 bytes
function(i,x)cumprod(c(i,x))

Try it online!

MATL, 3 bytes
hYp

Try it online!
            #implicit input, x_0 and A
h           #horizontally concatenate
Yp          #cumulative product
            #implicit output

The hYpe about MATL is real.

Python 3, 39 bytes
def f(a,b):
    for x in[1]+b:a*=x;yield a

Alternative approach. Returns a generator.
Try it online!

Wolfram Language (Mathematica), 14 bytes
FoldList@Times

Try it online!
FoldList[Times, a0, {x1, x2, ..., xn}] produces the desired output. FoldList[Times] is the curried form that produces a pure function still waiting for its a0 and {x1, x2, ..., xn}.

JavaScript (ES6), 27 bytes
Takes input as (m)(a).
m=>a=>[m,...a.map(x=>m*=x)]

Try it online!

Japt, 3 bytes
å*V

Try it

Explanation
        :Implicit input of array U and integer V
å       :Cumulatively reduce U
 *      :By multiplication
  V     :With an initial value of V

Jelly, 3 bytes
;×\

Try it online!

Perl 6, 9 bytes
{[\*] @_}

Try it online!

Standard ML, 32 bytes
fun f(x::r)a=a::f r(a*x)|f&a=[a]

Try it online!
Ungolfed:
fun f (x::xr) a = a :: f xr (a*x)
  | f    _    a = [a]

J, 6 5 bytes
-1 byte thanks to Bubbler
*/\@,

Try it online!
Explanation:
A diadic verb, the left argument is a0, the rigth one - the vector
     @, - append the vector to a0 and
  */\   - find the running product

*/\@, works exactly the same.

@Bubbler Yes, of course! Thank you!

Factor, 22 bytes
[ prefix cum-product ]

Try it online!

Batch, 69 bytes
@set/pa=
@echo %a%
@for %%d in (%*) do @set/aa*=%%d&call echo %%a%%

Takes input of \$a_0\$ on STDIN and the deltas as command-line arguments.

MathGolf, 6 5 bytes
\{\o*

Try it online!
I think this could be 5 bytes (\{\o*) but \ instruction seems a little off when dealing with input. This is now fixed in the latest version.
Explanation:
\       Swap arguments, pushing both to stack
 {      Foreach loop over second argument
  \o    Output counter with newline
    *   Multiply counter by current element
        Implicitly output the last element

I have redesigned the handling of \ with implicit input. It still handles items on the stack the same way, but now it pops two elements from the input onto the stack instead of just one. I think it could be useful for this challenge.

Pyth, 6 bytes
*FR._s

Test that one here!
Alternatively, 7 bytes:
.u*NYEQ

Test it here!
The first takes input as a tuple, the second takes input as two separate lines.
Thanks to @Sok for helping me with getting good at mapping and saving 1 byte.

You can save a byte by implementing the map in the second solution as R, as in *FR._s - demonstration

@Sok Nice catch! I had tried M assuming it'd work, then got a sugar parse failure - mostly because I didn't remember how the parsing for F <pf2> worked.

I'll be honest, I don't really understand how nested M, F, L, and R work, I just tried a bunch until one worked :o)

Common Lisp, 67 bytes
(lambda(a l &aux(y 1))(mapcar(lambda(x)(setf y(* y x)))(cons a l)))

Try it online!

Husk, 2 bytes
G*

Try it online!
This is equivalent to nimi's answer in Haskell: scanl(*), which means reduce from the left using multiplication, and return all partial results.

05AB1E, 5 3 bytes
šηP

-2 bytes thanks to @BMO.
Try it online or verify all test cases.
Explanation:
š      # Prepend the (implicit) input-integer at the start of the (implicit) input-list
       #  i.e. -12 and [7,-1,-12,4] → ["-12",7,-1,-12,4]
 η     # Prefixes of this new list
       #  i.e. ["-12",7,-1,-12,4]
       #   → [["-12"],["-12",7],["-12",7,-1],["-12",7,-1,-12],["-12",7,-1,-12,4]]
  P    # Take the product of each inner list (and output implicitly)
       #  i.e. [["-12"],["-12",7],["-12",7,-1],["-12",7,-1,-12],["-12",7,-1,-12,4]]
       #   → [-12,-84,84,-1008,-4032]

No, the s was there to get the other input. :) s is swap, and š is prepending at the start of the list. Either way, thanks for the -2

Python 2, 40 bytes
f=lambda a,b:[a]+(b and f(a*b[0],b[1:]))

Try it online!
Surprisingly, the move to Python 3 and use of generators there only saves 1 byte over the recursive solution.

PowerShell, 29 bytes
param($a,$b)$a;$b|%{($a*=$_)}

Try it online!
This assumes just outputting the values is fine.
> .\scratch.ps1 1 (1,5,3,2)
1
1
5
15
30

If that's not fine, this actually builds the list and then pushes it to toString which prints the same way.
param($a,$b)$c=,$a;$b|%{$c+=$_*$c[-1]};$c #41 bytes

Rules are: Output is a list/array/vector/. So, the first is fine.

Desmos, 47 bytes
f(k,l)=∏_{n=1}^{[1...l.length+1]}join(k,l)[n]

Try It On Desmos!
Try It On Desmos! - Prettified

K (ngn/k), 8 bytes
{x,x*\y}

Try it online!
Another easier-than-I-thought problem. \ is the scan operator.

Shuffling thing around a bit, I think this can just be *\,

Vyxal, 3 bytes
pɖ*

Try it Online!
p   # Prepend
 ɖ* # Cumulative product

Perl 5 -n, 16 bytes
$b||=1;say$b*=$_

Try it online!

Python 2, 47 bytes
lambda n,A:reduce(lambda a,c:a+[a[-1]*c],A,[n])

Try it online!

It may be of interest to you that a python solution is shorter in python 3 using generators

Charcoal, 12 bytes
ＩＥ⁺⟦Ｎ⟧ＡΠ⊞Ｏυι

Try it online! Link is to verbose version of code. Explanation:
    Ｎ           Input a₀
   ⟦ ⟧          Wrap in a list
      Ａ         Input deltas as a list
  ⁺              Concatenate lists
 Ｅ              Map over elements
           ι    Current element
          υ     Predefined empty list variable
        ⊞Ｏ      Push and return updated list
       Π        Product
Ｉ               Cast to string
                Implicitly print each value on its own line

K (oK), 9 bytes
{(*\)x,y}

Try it online!
Joins the first number to the second input as a list, and then returns successive results of multiplication
Test Cases
Enter your input after the function like below and then run, as I'm unsure how to use input properly for this language in TiO
{(*\)x,y}[1;1 5 3 2]

dc, 13 bytes
p[*pz1<A]dsAx

Try it online!
p[*pz1<A]dsAx
p               # Print the first element
  *p            # Multiply top elements on the stack
 [  z1<A]dsAx   # until only one element is left

Uiua SBCS, 3 bytes
\×⊂

Try it!


text:
You are given a string to make and starting with the empty string, make it using appending and cloning cost
Your task is to create the given target string. Starting with an string that is empty, you will have to add characters to it, until your string is the same as the one we want. You can either add a character to the end of you string with cost x, or you can clone you string with cost y. What we want is the cheapest way to do this.
Test Cases
targetString , appendcost, clonecost -> totalcost

"bb", 1, 2 -> 2
"bbbb", 2, 3 -> 7
"xzxpcxzxpy", 10, 11 -> 71
"abababab", 3, 5 -> 16
"abababab", 3, 11 -> 23

How are the costs defined? Are they positive integers?

I think you're just looking to make code golf (shortest code) challenge, so I removed the code challenge and programming puzzle tags which indicate some alternative way of scoring.

I think it would help to have more test cases, since it seems likely someone could write a program that has good heuristics that work for all the test cases but aren't optimal in general. In particular, none of the test cases have multiple clones, or clones of substrings that aren't at the start. I think it would also be good to have an example where changing just the costs changes the output.

Nice first challenge, by the way!

Is cloning a single letter still considered a clone operation ?

We cannot assume the clone cost will always be larger than append costs. I misread this as we can assume. Either way, it should be added in the challenge body rather than just as a comment.

If the clone cost may indeed be less than the append cost, I'd recommend to add some corresponding test cases. (e.g. x=2, y=1, s="aabcdefgh" --> 17 vs x=1, y=2, s="aabcdefgh" --> 9)

Husk, 25 bytes
φ?ö▼z+:⁴∞²m⁰§:h§δf`€otṫḣ0

Try it online!
Inputs are in the order append cost, clone cost, target.
Explanation
φ?ö▼z+:⁴∞²m⁰§:h§δf`€otṫḣ0  Two explicit inputs and one implicit.
                           Example: 2, 3, s="abab"
φ                          Make a recursive function and call it on s:
 ?                      0   If s is empty, return 0.
  ö▼z+:⁴∞²m⁰§:h§δf`€otṫḣ    Otherwise do this.
                       ḣ    Prefixes: ["a","ab","aba","abab"]
                    otṫ     Suffixes except the first one: ["bab","ab","b"]
               §δf`€        Keep those prefixes that have the corresponding suffix as substring: ["ab","aba"]
            §:h             Prepend s minus last character: ["aba","ab","aba"]
          m⁰                Recurse on each: x=[6,4,6]
        ∞²                  Repeat the clone cost: [3,3,3,..
      :⁴                    Prepend append cost: [2,3,3,3,..
    z+                      Add component-wise to x: [8,7,9]
   ▼                        Minimum: 7

JavaScript (ES6), 123 111 bytes
Takes input as (x)(y)(s).
x=>y=>m=g=([s,...r],o='',c=0)=>s?[...r,g(r,o+s,c+x)].map(_=>s+=r.shift(~o.search(s)&&g(r,o+s,c+y)))|m:m=m<c?m:c

Try it online!
Commented
x => y =>                    // x = 'append' cost; y = 'clone' cost
m =                          // m = minimum cost, initialized to a non-numeric value
                             //     this is what will eventually be returned
g = (                        // g = recursive function taking:
  [s,                        //   - the input string split into s = next character
      ...r],                 //     and r[] = array of remaining characters
  o = '',                    //   - o = output string
  c = 0                      //   - c = current cost
) =>                         //
  s ?                        // if s is defined:
    [ ...r,                  //   split a copy of r
      g(r, o + s, c + x)     //   do a recursive call with an 'append' operation
    ].map(_ =>               //   iterate as many times as there are remaining characters
                             //   in r[], + 1
      s +=                   //     append to s
        r.shift(             //     the next character picked from the beginning of r[]
          ~o.search(s) &&    //     if s is found in o,
          g(r, o + s, c + y) //     do a recursive call with a 'clone' operation
        )                    //     (note that both s and r are updated *after* the call)
    ) | m                    //   end of map(); return m
  :                          // else:
    m = m < c ? m : c        //   update m to min(m, c)

Python 2, 112 bytes
f=lambda s,a,c,i=0:i<len(s)and min([a+f(s,a,c,i+1)]+[c+f(s,a,c,n)for n in range(i+1,len(s)+1)if s[i:n]in s[:i]])

Try it online!

R, 192 185 bytes
f=function(s,a,c,k=0,x="",R=substring,N=nchar,p=R(s,1,1:N(s)))'if'(!N(s),k,{y={};for(i in c(R(s,1,1),p[mapply(grepl,p,x)]))y=min(y,f(R(s,N(i)+1),a,c,k+'if'(any(y),c,a),paste0(x,i)));y})

Try it online!
Unrolled code and explanation :
# s is the current remaining string (at the beginning is equal to the target string)
# a is the append cost
# c is the clone cost
# k is the current cost (at the beginning is zero)
# x is the partially constructed string (at the beginning is empty)
f=function(s,a,c,k=0,x=""){
  # store in p all the possible prefixes of s
  p = substring(s,1,1:nchar(s))
  # if s is empty return the current cost k
  if(!nchar(s))
    k
  else{
    y={}
    # prepend the first letter of s (=append operation) to
    # the prefixes in p that are contained in x (=clone operations)
    for(i in c(substring(s,1,1),p[mapply(grepl,p,x)])){
      # perform first the append then the clone operations and recurse,
      # storing the cost in y if lower than previous
      # (if y is NULL is an append operation otherwise is a clone, we use the right costs)
      y = min(y,f(substring(s,nchar(i)+1),a,c,k+'if'(any(y),c,a),paste0(x,i)))
    }
    # return the current cost
    y
  }
}


text:
Find a way to determine to which fibonacci squares a given coordinate belongs

Given a random coordinate (x,y), determine in which square (squares are referenced by their sidelength) it is (or the borders of which squares).
The squares are drawn in a counter clockwise direction, that is, the first square is drawn in the first quadrant, the one after is to the right, the one after that above, the next to the left and so on. The length of the square sides follows the fibonacci sequence (each new one is the sum of the two previous ones).
So, for example, given a coordinate (0,3) it should display 8, whereas (0,1) would display 0,1,2. Decimal coordinates are also aloud.

Welcome to the site! I think this challenge is really interesting, but needs a couple edits as the people who put it on hold indicated. There needs to be a winning criterion, so I'm going to add the [tag:code-golf] tag since that is most commonly used. I'm also going to replace switch the x-y coordinates that you used as examples since the horizontal axis component is shown first in most notations. Feel free to revert any of the edits if they are not what you intended

Should $0,1,2$ be $0,1,5$? $0,1,2$ looks like the output of $(1,1)$ to me.

@Citronmelisa What is the winning criteria?

@dylnan Don't edit challenges to add winning criteria without OP's words.... https://codegolf.meta.stackexchange.com/questions/14838/on-editing-somebody-elses-off-topic-question-to-make-it-on-topic-without-the-ow

I rollback'd, but OP can edit it in whatever way they want. By the way Latex uses \$...\$, see also https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference

Welcome to PPCG! Nice concept. But you have a weird case with the square you label 0. Unlike all other squares, it does not have area 0^2, instead it has area 1^2. Also, the 2 square is not the sum of preceding labels 1 and 0. The fib sequence is 0,1,1,2,3,5,8... but your sequence is 0,1,2,3,5,8.... Frustrating to answerers; many bytes of code just to avoid duplicate 1 labels. An alternative: same idea, but label the squares with the index 0,1,2,3,4,5... of the Fib sequence instead. So x=10, y=3 would yield (5,6,9) with 0-based labels instead of (8,13,55).

Please add an objective winning criterion, such as [code-golf]

Why is the middle square labeled $0$ if it has side length $1$?


text:
Scoring Chinese Hearts
Chinese Hearts, also known as Gong Zhu (拱猪, Chase the Pig), is a variance of the Hearts game. It is a 4 player card game with the aim to earn the highest amount of points. You may read more about it on Wikipedia. This time, we want implement a program (full or function) to calculate ones score.
Scoring
The player who plays the highest-value card of the suit that is led wins all cards in this round. And after the game, the score is calculated by these cards:

♥2, ♥3, ♥4 = 0 points for each;
♥5, ♥6, ♥7, ♥8, ♥9, ♥10 = -10 points for each;
♥J = -20 points;
♥Q = -30 points;
♥K = -40 points;
♥A = -50 points;
♠Q = -100 points; ♠Q known as the Pig (猪)
♦J = +100 points; ♦J known as the Goat / Sheep (羊)
♣10 = +50 points along, and x2 with other cards; ♣10 known as the Double / Transformer (变压器)

Special rules:

If a player collects only ♣10, it is worth +50 points. But if a player collects ♣10 together with any other non-zero point cards, it doubles the other cards' points.
If a player collects all hearts ♥2 ~ ♥A (全红), ♥2 ~ ♥A count as +200 points instead of -200 points.
If a player collects all hearts plus ♠Q and ♦J, ♠Q counts as +100 points instead of -100 points.

Scoring rules may vary from place to place. Note that this challenge does not include "sell" (卖/明牌) which would make it more complex.
Input / Output
Input would be a string (or a list of characters).

23456789TJQKA for ♥2 ~ ♥A
P for ♠Q
G for ♦J
D for ♣10

All other cards are ignored from input. You won't get characters out of this list.  We use one deck of cards (52 cards) in this challenge. So, there won't be duplicate cards in the input.
Output as an integer, the score of these cards.
Examples and Testcases
Input            Output
234               0
56789T           -60
T                -10
J                -20
Q                -30
K                -40
A                -50
TJQK             -100
P                -100
G                 100
TJQKP            -200
PG                0
2468TQKG          0
D                 50
234D              50
GD                200
PGD               0
TJQKGD            0
23456789TJQK     -150
3456789TJQKA     -200
23456789TJQKA     200
23456789TJQKAP    100
23456789TJQKAG    300
23456789TJQKAPG   400
2356789TJQKAPD   -600
23456789TJQKAPGD  800
DP2A45968TJK7QG3  800
DP24             -200
G2P6D4           -20

Rule

This is code-golf, shortest codes in bytes win.
Standard loopholes are forbidden.

Note: Some details of scoring rules may be differ from game to game. Some rules allow all hearts plus ♠Q count as +300 points, regardless whether ♦J is collected or not. Some rules apply ♥2, ♥3, ♥4 to ♣10, and collecting ♥2, ♥3, ♥4 together with ♣10 is 0 points instead of +50 points. However, your answer have to follow the rule described in this post.

JavaScript (ES6), 160 156 146 143 135 bytes
Saved 10 bytes thanks to @tsh
Takes input as an array of characters.
a=>(a.map(c=>(i='GPDTJQKA'.search(c))>2|c?t-=h--*c?c>4:i-2:m|=1<<i,m=t=0,h=13),t+=!h*40+(m&2)*(m&!h?5:-5)+m%2*10,t+=m&4?t|m&3?t:5:0)*10

Try it online!
Commented
a => (                     // a[] = input array
  a.map(c =>               // for each card c in a[]:
    (i =                   //   convert c into an index i (-1 to 7)
      'GPDTJQKA'.search(c) //   in the string 'GPDTJQKA'
    ) > 2                  //   if c is a heart symbol (TJQKA)
    | c ?                  //   or c is numeric (2-9):
      t -=                 //     update t (total number of points / 10):
        h--                //       decrement h (number of hearts)
        * c ?              //       if c is numeric:
          c > 4            //         decrement t if c is greater than 4
        :                  //       else:
          i - 2            //         subtract 1 (for Ten) to 5 (for Ace) from t
    :                      //   else:
      m |= 1 << i,         //     update the bitmask m of special cards (G=1, P=2, D=4)
    m = t = 0, h = 13      //   start with m = 0, t = 0 and h = 13
  ),                       // end of map()
  t +=                     // update t (pass #1):
    !h * 40 +              //   add 40 to t if we have all hearts (-(-200) + 200)
    (m & 2) * (            //   if we have the Pig:
      m & !h ?             //     if we have all hearts and the Goat:
        5                  //       add 10 to t (the Pig is worth +100)
      :                    //     else:
        -5                 //       subtract 10 from t (the Pig is worth -100)
    ) +                    //
    m % 2 * 10,            //   add 10 to t if we have the Goat (the Goat is worth +100)
  t +=                     // update t (pass #2):
    m & 4 ?                //   if we have the Double:
      t | m & 3 ?          //     if t is non-zero or we have either the Pig or the Goat:
        t                  //       double t by adding it to itself
      :                    //     else:
        5                  //       add 5 to t (the Double alone is worth +50)
    :                      //   else:
      0                    //     leave t unchanged
) * 10                     // multiply the final result by 10

146 bytes

Charcoal, 107 bytes
≔”A↘⊟Ｔ“{»aS¡I⁷”ζ≔×χΣΦ”)⊟≡ＧＯ∧”№θ§ζκηＦ¬⌊Ｅ…⮌ζ¹³№θι≦±ηＦ№θG≧⁺¹⁰⁰η¿⌊Ｅζ№θι≧⁺¹⁰⁰ηＦ№θP≧⁻¹⁰⁰ηＦ№θD¿Φ…ζ¹²№θκ≧×²η≧⁺⁵⁰ηＩη

Try it online! Link is to verbose version of code. Explanation:
≔”A↘⊟Ｔ“{»aS¡I⁷”ζ

Save the string PGAKQJT98765432 for later. In particular, this string ends with the 13 Hearts and starts with the 12 scoring cards.
≔×χΣΦ”)⊟≡ＧＯ∧”№θ§ζκη

Loop over the string 005432111111. Keep the digits corresponding to the cards from the saved string that appear in the input, then take the sum and multiply by 10.
Ｆ¬⌊Ｅ…⮌ζ¹³№θι≦±η

If at least one of the Hearts does not appear in the input then negate the total.
Ｆ№θG≧⁺¹⁰⁰η

Add 100 for each Goat.
¿⌊Ｅζ№θι≧⁺¹⁰⁰η

If the Goat and all of the Hearts are present then add 100 for the Pig,
Ｆ№θP≧⁻¹⁰⁰η

otherwise subtract 100 for each Pig.
Ｆ№θD¿Φ…ζ¹²№θκ≧×²η≧⁺⁵⁰η

For each Transformer, if any of the scoring cards a present then double the total otherwise add 50.
Ｉη

Output the total.

Don't know if it helps your byte count but there can only be one "pig" and one "transformer" in the input.

@Shaggy Charcoal has implicit else so using if costs a byte if you don't need it, unless it happens to be at the end of a block. (Of course, you can only switch to for if your value is known to be 0 or 1.)

Python 2, 183 180 bytes
H=set(input())
a=len(H-set('PGD'))>12
s=sum('TJQKA'.find(c)+1or'4'<c<':'for c in H)*(1|-a)-10*[0,1,-1,2*a][('G'in H)+2*('P'in H)]
print-10*[s,[-5,2*s][any(H-set('D234'))]]['D'in H]

Try it online!