text:
Anaglot Polygrams
Task
Write some code that can be rearranged into n different programs in n different languages each outputting a distinct number from 1 to n.
No two languages should be the same however different versions of "the same language" will be considered distinct languages, as long as they have different major version numbers.  For this challenge REPL environments are not distinct from their parent languages but are still a language.  Each language should run on a distinct permutation of the source code and output a distinct number in the range.
Permutations will be counted in bytes not in characters.
You should include each permutation that is run with the language that it is run in for testing purposes.
Scoring
Your score will be the

Where N is the number of languages and L is the number of unique orderings of the programs bytes.
L is not equal to the length of the program
(unless the program is 1 or 0 bytes)
Here is a python script to calculate L courtesy of Conor O'Brien.
L is equal to the length of the program factorial if and only if there are no repeated bytes in the program.
The goal is to maximize your score.

Related.

are comments allowed?

@Adám There would be no reasonable way to ban comments

So if # is the comment symbol in 5 languages, good solution would be 1#2345

@Adám that gives you a score of 1/6. I'm sure a score of 1 is easily possible with a 2-byte program (or a 1-byte program for that matter). And adding more digits reduces your score.

https://en.wikipedia.org/wiki/Four_fours maybe? I don't know enough programming languages to work this out for myself but repeating characters doesn't cost you as much in the denominator.

Does it have to be distinct numbers from 1 to n? Can we just output distinct integers?

@Riker No they have to be 1-n

You might want to use this revised script, which allows for longer texts to be used

34 Languages, 19 bytes, Score: 38,832,018,459,912,437,760,000
Here is a quick answer I threw together to show that it is possible to get an answer scoring better than 1.
 12233echo*+--@#..;

1. NTFJ
#*22331+..@o;-- ech

This outputs via character code, which is allowed by meta consensus.
Try it here
2. Tcsh
echo 2;#..1@2+33*--

3. 05AB1E
2231*+..@echo ;--#3

Try it online!
4. Actually
@..o; eho1#c3223-*+-

Try it online!
5. Befunge 98
23+.@.21*#3o;-- ech

Try it online!
6. Cubix
123+23*o@#;-- ech..

Outputs by character code
Try it here
Unfolded code:
    1 2
    3 +
2 3 * o @ # ; -
- e c h . . . .
    . .
    . .

7. Haskell 8 REPL
3+2*2 --31#;@..echo

8. Seriously
@..o; eho1#c3223-+*-

Try it online!
9. ><>
33*o;2+..@#12-- ech

Outputs by character code
Try it online!
10. Befunge
33*1+.@.#22o;-- ech

Try it online!
11. brainbool
323*+..@echo ;--#12

Try it online!
12. 2sable
233*+..@echo ;--#12

Try it online!
13. Hexagony
13;2#2+@*3o-- ech..

Outputs by character code
Try it online!
Unfolded code:
  1 3 ;
 2 # 2 +
@ * 3 o -
 - e c h
  . . .

14. R
12+2#*33..@o; ech

Try it online!
15. bc
12+3#*23..@o;-- ech

16. Python 3 REPL
13+3#*22..@o;-- ech

17. irb (Ruby 2.4 REPL)
13+2*2#3..@o;-- ech

18. PowerShell
12+2*3#3..@o;-- ech

19. Python 2 REPL
13+2*3#2..@o;-- ech

20. Python 1.6.1 REPL
23-3#-+*21..@o; ech

21. Ksh
echo 21;#..2@3+3*--

22. Bash
echo 22;#..1@3+3*--

23. Zsh
echo 23;#..1@2+3*--

24. Applescript
23+1 --#2*3..@o;ech

25. Lua REPL
23+2 --#1*3..@o;ech

26. Julia REPL
23+3 #2*1..@o;--ech

27. irb (Ruby 1.9.3 REPL)
13*2+3-2 #..@o;-ech

28. Haskell 7 REPL
13*2+2--3#;@.. echo

29. J
echo --1#.23;@+2*.3

Try it online!
30. Nim
echo 33-2-1;#..@2+2*

31. fish
echo 31;#3-2-..@2+2*

32. PHP
echo 32;#+123*@..--

<?php is not needed due to this meta
Try it online!
33. Golfscript
3.#.1223*@+o;-- ech

Try it online!
34. Octave
33+1 #22echo*--@..;

Try it online!

And that's why I hate REPL-capable languages

If you add . and another language, you can have 11. J: 2#.2+3*3

@WheatWizard here

@WheatWizard FWIW, all valid J permutations

@WheatWizard J is technically a REPL. Prefix the code with echo  to see the output.

Nice! +1 BTW, I am not too behind! :)

Even more TIO links: Python 3, Python 2, zsh,
Lua, Julia, Ruby, Haskell (not sure how to do this one)

Also ksh, bash (also not sure about the ruby one in the last comment, probably the wrong version)

echo+32;#123*@.--  PHP anyone?

Will you stop, please !!!! No one can beat that, never!

@WheatWizard We usally don't use the tags when golfing (only if we use it to output like <?=) because you can run code using php -r without the tags. There's some meta for that if I find the time I will link it.

@WheatWizard Relevant meta.

jelly 35, Vyxal 36

1 language, 0 bytes, score 1
I don't know how high scores will get in this challenge, so let's take this spot.

Try it online!
In Retina, the empty program with no input prints 1.
Score = 1!/0! = 1/1 = 1

This looks at first glance like a joke answer, but has the highest score so far...

Same score for a 1 byte single language  entry, no?

@Adám  yeah, like 1 in R, for example

@Giuseppe Or any other language that outputs numbers without any specific command like echo or print.

In jelly, this outputs 0, so 2 languages => score=2

@Mr.Xcoder No that is not how the scoring works.  You must output 1 through n and each should be on a separate permutation.

Where's your TIO link?

Um, the score is infinity (or NaN), not 1.

@Steve Nope.  The number of permutations of a length 0 program is 0! = 1.

Oh, I just learnt something, thanks.

2 languages, 2 bytes, score 1
Doesn't beat Leo's answer, but I thought I'd present a 2-language solution (well, and Wheat Wizard ninja'd a score-2 answer in between anyway).
Retina, prints 1
2`

Try it online!
This is essentially the same as Leo's empty program.
Pyth, prints 2
`2

Try it online!
This is repr(2) so it computes "2" which gets printed as 2.

26 languages, 46 bytes, Score : 1.68861953e-28 (0.000000000000000000000000000168861953)
All the languages are mainstream ones (i.e. they are actually used by people in development) and there's no REPL solution in any language. This answer is never going to win, but that's not a reason for not posting it...
//#**print()ale123456789+chous :f{}:""enttd *;

1. Python 2
print 1#//**()alechous:f{}:23456789+ ""enttd*;

Try it online!
2. Python 3
print(2)#//**alechous13456789+: f{}: ""enttd*;

Try it online!
3. Ruby
puts 3#//**()alecho:f12456789+{}rin: ""enttd*;

Try it online!
4. CoffeeScript
alert 4#//**()pinchous:12356789+f{}: ""enttd*;

Try it online!
5. PHP
echo 5/*alrt#()pinus:f{:12346789+} ""enttd;**/

Try it online!
6. Perl 5
print 6#/*ale()chous:12345789+f{:} */""enttd*;

Try it online!
7. Perl 6
print 7#/*ale)(chous:f12345689+{:} */""enttd*;

Try it online!
8. JavaScript (ES5)
alert(8)//pin 12345679+#*chous:f{:} *""enttd*;

Try it online!
9. JavaScript (ES6)
alert(9)//inp 12345678+#*chous: f{:}*""enttd*;

Try it online!
10. JavaScript (ES7)
alert(9+1)//pni #*chous2345678: f{:}*""enttd*;

Try it online!
11. Batch
echo 9+2 ::alrt()//pni#*usf{1345678}*""enttd*;

Couldn't find an online interpreter for this one. Try running this code in the Command Prompt, if you are on Windows.
12. Bash
echo 12 #::alrt(3456789+)//pni*usf{}*""enttd*;

Try it online!
13. CSS
*:after{content:"13" /*h# l(2456789+)pisud;*/}

Try it online!
14. Less
*:after{content:"14" /*#h l(2356789+)pisud;*/}

Try it online!
15. Stylus
*:after{content:"15" /*#hl (2346789+)pisud;*/}

Try it online!
16. TypeScript
alert(16)//inp #*chous2345789+: :{f}*""entt*d;

Try it online!
17. Octave
disp(17)#//n *chou2345689+: :{f}*""entt*alert;

Try it online!
18. Swift
print(18)//ds# *chou2345679+: :{f}""ent*ale*t;

Try it online!
19. Julia
print(19)#ds// *chou2345678+: :{f}""ent*ale*t;

Try it online!
20. Maxima
print(18+2);/*#ds ouch 345679::{f}""entale*t*/

Try it online!
21. Clojure
(print "21");/*#ds ouch3456789+::{f}entale*t*/

Try it online!
22. Groovy
print 19+3//();*#ds oh245678::{fuc*}entalet*""

Try it online!
23. CommonLisp
(print 23);//*#ds oh1456789+::{fuc*}entalet*""

Try it online!
24. EmacsLisp
(print 24);//*#ds oh1356789+::{fuc*}entalet*""

Try it online!
25. PicoLisp
(print 25);//*#ds oh1346789+::{fuc*}entalet*""

Try it online!
26. Logo
print 21+5 ;//*#dsoh346789::{fuc*}entalet*""()

Try it online!

And Swift, displaying 18: print(18)//#**alechous: f{}:2345679+ ""enttd*

Suppose this will increase your score by about 0.002e-20 :))

pfft. 2017 will be the year of the Befunge Web Framework!

Comments are just going to turn this entire question into insanity…

btw Applescript which can be seen in my answer works without a REPL, but does require -- for comments.  If you add -- you can probably also work in at least one type of haskell.

You also don't need all the characters you have 6 can be replaced with 2*3 in the first instance and 8*2 when it is being used to make 16.  You could probably do the same with some of the other digits.  (I see you have already dumped 0)

Right now I think you should aim to minimize the number of characters in your source, removing a single character will currently multiply your score by 44.  Grouping characters is also not a bad idea, In my answer I repeat 2 and 3 because repeats contribute less to the count.

Ruby has print btw, so you don't need the u from the puts.  If you use printf in bash and print in batch, you can also get rid of some characters there. (cho)

@WheatWizard Thank you so much for the suggestion (and the upvote! :)) But, unfortunately, I can't implement them. Doing so will require me to update all the TIO links that I have linked to in my answer before reading your comments, as well as updating all the solutions. I, currently, don't posses enough potential to perform that! Sorry (and thanks for the upvote; that really lifted my spirits; as I was thinking "What the hell did I add those 9 more languages and revised TIO links for?!") I hope you'll understand my predicament! Sorry (and thanks for the upvote!), once again! :) Thanks for....

....reading such long comment too! :) @WheatWizard

@Mr.Xcoder Thanks for that! Added it! Along with it, I have added 8 more languages too (excluding Swift)! But that only made my score worse! :p

@Mathime Added 9 more languages! Have a look!

@Skyler I don't get what you mean! Could you explain, please! Sorry, if it's too obvious! :p

12 Languages, 16 Bytes - Score: 0.003
print(0b11000)#1

Prints 1 in 2sable
print(0b1100)#10

Print 10 in 05AB1E
print(0b11)#1000

Re-arranging the binary numbers prints 2-9, 11-12 in:

Crystal
Julia 0.5
J-uby
Lily
Perl 5
Perl 6
Python 3
Python 2
Python
Ruby

L=145297152000
12! = 479001600
I just used TiO for a list of valid languages for this (If these are all considered unique?).  Removed some duplicate languages thanks to input from Wheat Wizard.  This answer is looking pretty low, though I feel it has potential.

Julia 0.4 and 0.5 have the same major version number.  And so does Python 2 (PyPy) and Python 2.  However this will probably work in Python 1

Can you leave off the print and call it repl? How many of these have repls?

@BrianMcCutchon Lily, Perl, and Crystal do not have repls.  All the other ones do.

JavaScript (ES6), Python 2, Python 3, Japt, 4.735e-15
# ()//1234=>inprt

ES6 (1)
p=>1//rint 234()#

Python 2 (2)
print 2#134=>//()

Python 3 (3)
print(3)# 124=>//

Japt (4)
#rint>=3/2)p (4/1

Your score is 4.73508590206e-15 btw.

Is it? 4 factorial is 24. That divided by 17 is roughly 1.4

Not divided by 17 but by 5068545850368000, the number of ways to rearrange the string.

Oops. Misread that. Thanks for pointing it out.

@WheatWizard Ouch, I missed that too.

I don't know how it would affect the Japt answer, but you could switch Python2 to print 1 with 4/3 to save 1 byte

As I calcuated, your score is actually 1,3495e-13, because there are 177843714048000 permutations according to the script provided.


text:
Swap indices and values
The task
Write a program or function whose input is a list/array X of integers, and whose output is a list of sets of integers Y, such that for each element e in each set Y[i], X[e] = i, and such that the total number of elements in the sets in Y equals the number of elements in X.
(This is basically the same operation as reversing a hashtable/dictionary, except applied to arrays instead.)
Examples
These examples assume 1-based indexing, but you can use 0-based indexing instead if you prefer.
X             Y
[4]           [{},{},{},{1}]
[1,2,3]       [{1},{2},{3}]
[2,2,2]       [{},{1,2,3}]
[5,5,6,6]     [{},{},{},{},{1,2},{3,4}]
[6,6,5,5]     [{},{},{},{},{3,4},{1,2}]

Clarifications

You may represent a set as a list, if you wish. If you do so, the order of its elements does not matter, but you may not repeat elements.
You can use any reasonable unambiguous I/O format; for example, you could separate elements of a set with spaces, and the sets themselves with newlines.
Y should be finitely long, and at least long enough to have all elements of X as array indexes. It may, however, be longer than the maximal element of X (the extra elements would be empty sets).
The elements of X will all be valid array indices, i.e. non-negative integers if you use 0-based indexing, or positive integers if you use 1-based indexing.

Victory condition
As a code-golf challenge, shorter is better.

Related. In the Sandbox post (now deleted, but you can view it if you have the reputation), we decided it probably wasn't a duplicate, but feel free to vote to close if you disagree.

Does "the order of its elements does not matter" mean that the outputs of [5,5,6,6] and [6,6,5,5] can be identical?

@LeakyNun The order of the elements of the sets in the output list doesn't matter. So [5,5,6,6] and [6,6,5,5] can't have identical output, but the output for [5,5,6,6] could also have been, e.g., [{},{},{},{},{2,1},{4,3}].

Is there an assumable max value of an index in X? Also can empty sets have a 0 in them instead of being actually empty? For example would [{0},{0},{0},{0},{1,2},{3,4}] be valid output for [5,5,6,6]?

@Mayube: No to the first answer (although if you're using a language which has limited range on integers, you can write the program as though integers could be unboundedly large, and not worry about it breaking if someone gives you an out-of-range integer as input). With respect to the second question, that's an unambiguous (if weird) syntax when you're using 1-based indexing, so yes in that case (obviously, no if you're using 0-based indexing because then the 0 would mean someting else.)

MATL, 8 bytes
tn:IXQ&D

Input is a column vector, with ; as separator (for example [2;2;2]). Output is the string representation of a cell array of row vectors (for example {[]; [1 2 3]}). A row vector of a single element is the same as a number (so {1; 2; 3} would be output instead of {[1]; [2]; [3]}).
Try it online! Or verify all test cases.
Explanation
t     % Implicit input, say x. Duplicate
n     % Number of elements, say N
:     % Range: [1 2 ... N]
IXQ   % accumarray(x, [1 2 ... N], [], @(x){sort(x).'})
&D    % String representation

Most of the work is done by Matlab's higher-order function accumarray, which groups elements in the second input according to matching values in the first, and applies a specified function to each group. The function in this case is @(x){sort(x).'}, which outputs the sorted elements in each group and causes the results for all groups to be packed in a cell array.

Jelly, 7 5 bytes
=þṀT€

Try it online!
How it works
=þṀT€  Main link. Argument: A (array)

  Ṁ    Yield m, the maximum of A.
=þ     Equals table; for each t in [1, ..., m], compare all elemnts of A with t,
       yielding a 2D Boolean array.
   T€  Truth each; for each Boolean array, yield all indices of 1.

Python, 69 bytes
lambda s:[[j for j,x in enumerate(s)if x==i]for i in range(max(s)+1)]

Uses 0-based indexing.

Jelly, 8 bytes
Jẋ"Ṭ€;"/

Try it online!
How it works
Jẋ"Ṭ€;"/  argument: z           eg. [6,6,4,4]
J         [1 .. len(z)]             [1,2,3,4]
   Ṭ€     untruth each of z         [[0,0,0,0,0,1],
                                     [0,0,0,0,0,1],
                                     [0,0,0,1],
                                     [0,0,0,1]]
 ẋ"       repeat each of ^^         [[[],[],[],[],[],[1]],
          as many times as           [[],[],[],[],[],[2]],
          each of ^                  [[],[],[],[3]],
                                     [[],[],[],[4]]]
       /  reduce by...
     ;"   vectorized concatenation  [[],[],[],[3,4],[],[1,2]]

Mathematica, 36 bytes
Join@@@#~Position~n~Table~{n,Max@#}&

Explanation

For each n in {1, 2, ..., Max@#}, where Max@# is the largest integer in the input list, computes the Positions where n appears in the input list #. Since Position[{6,6,5,5},5] (for example) returns {{3},{4}}, we then Apply Join to all elements at level {1} of the result.

R, 68 49 47 bytes
lapply(1:max(x<-scan()),function(y)which(y==x))

Surprisingly, a lot more straightforward than the longer solutions. Takes a vector x from STDIN, creates a vector from 1 to max(x), implicitly generates a list of length max(x), and checks which indices in x correspond with those in the new list. Implicitly prints output.
Older version:
o=vector('list',max(x<-scan()));for(i in x)o[[i]]=c(o[[i]],F<-F+1);o

Slightly different approach to the other R answer. Takes a vector to STDIN, creates a list with length equal to the maximum value in the input. Loops over the input and adds the index into the right place.
Uses 1-based indexing.

PHP, 55 bytes
<?while($i<=max($_GET))print_r(array_keys($_GET,$i++));

0-indexed.

Haskell, 45 bytes
s takes a list of integers and returns a list of lists. 1-indexed to keep the test case inputs unmodified (although the output gets some extra empty lists).
s l=[[i|(i,y)<-zip[1..]l,y==x]|x<-[1..sum l]]

Try it online!
These are pretty straightforward nested list comprehensions. The only slight tweak is taking advantage of the option to make a longer list by using sum instead of maximum.

Python 2, 91 86 85 bytes
I am programming on my phone but I really liked this challenge. I can most definitely golf this further.
def f(a):
 r=[[]for i in range(max(a)+1)]
 for i,j in enumerate(a):r[j]+=[i]
 print r

Try it online!

Out-golfed again by a nested list comprehension. :D

Jelly, 9 bytes
Ṭ+\ịĠȧ@"Ṭ

1-indexed, empty sets represented as 0, sets of one item represented as N sets of multiple items represented as [M,N,...]
Try it online!
How?
Ṭ+\ịĠȧ@"Ṭ - Main link: list a        e.g. [6,6,4,4]
Ṭ         - untruth a                     [0,0,0,1,0,1]
  \       - cumulative reduce with:
 +        -   addition                    [0,0,0,1,1,2]
    Ġ     - group indices of a by value   [[3,4],[1,2]]
   ị      - index into                    [[1,2],[1,2],[1,2],[3,4],[3,4],[1,2]]
        Ṭ - untruth a                     [0,0,0,1,0,1]
       "  - zip with:
     ȧ@   -   and with reversed @rguments [0,0,0,[3,4],0,[1,2]]

JavaScript (ES6), 64 62 bytes
Saved 2 bytes thanks to @SteveBennett

Takes 0-indexed input. Returns a comma-separated list of sets.
a=>a.map((n,i)=>o[n]=[i,...o[n]||[]],o=[])&&`{${o.join`},{`}}`

Test cases

let f =

a=>a.map((n,i)=>o[n]=[i,...o[n]||[]],o=[])&&`{${o.join`},{`}}`

console.log(f([3]))
console.log(f([0,1,2]))
console.log(f([1,1,1]))
console.log(f([4,4,5,5]))
console.log(f([5,5,4,4]))

Alternate version, 53 bytes
If a simplified output such as '||||3,2|1,0' is acceptable, we can just do:
a=>a.map((n,i)=>o[n]=[i,...o[n]||[]],o=[])&&o.join`|`

Wow. I'm so confused how \{${o.join`},{`}}`` is legal ES2015.

@SteveBennett, it's a template literal. In older versions of JS it would be "{" + o.join("},{") + "}", if that makes it any clearer.

No, I know about those - it's the backquote after the word join that confuses me. Is that closing the string (in which case wtf) or is that how you escape a close brace?

Hmm, ok, so in this context join\`` is equivalent to join('`. Had no idea you could do that.

Ah, now I see. It's a tagged template literal. Which you can abuse to save a couple of characters whenever calling a function that takes one string argument (and ignores others): array.join\ `. Super confusing here because you're embedding that within a template string, and even more confusingly, the joining string is },{`, which coincidentally looked like part of the template string...and is just weird and ugly anyway. :)

Passing the array initialisation as the this parameter to Array.map is pretty genius too. So much golfing wisdom in such a short answer! :)

@SteveBennett As a side note, one must keep in mind that f\param` is *not* the same asf(param). With the first syntax, freceives an array containing a string, which may or may not be coerced to a string. For instance,eval`a=123` will just return[ a=123 ]` without evaluating the embedded expression.

Yeah, good to note, thanks.

FWIW, I think you can save more characters by being more creative with your choice of output format, as per rule 1 and 2. No need to use curly braces. For instance: a=>a.map((n,i)=>(o[n]=[i,...o[n]||[]]),o=[])&&\${o.join`|`}``

@SteveBennett I was not 100% sure of the output format requirements when I posted this, but you're probably right. Actually this could be simplified down to &&o.join\|` `.

err yep! (.....)

Also I think you have some redundant parentheses. So now down to 53 characters: a=>a.map((n,i)=>o[n]=[i,...o[n]||[]],o=[])&&o.join\|``

@SteveBennett D'oh. Good catch on the parentheses. Thanks!

R, 80 72 bytes
1-indexed, takes X from stdin. Returns a list of vectors of the indices, with NULL as the empty set.
X=scan();Y=vector('list',max(X));Y[X]=lapply(X,function(x)which(X==x));Y

Try it online!
old version:
X=scan();Y=vector('list',max(X));for(i in 1:length(X))Y[[X[i]]]=c(Y[[X[i]]],i);Y

Try it online!

I think that Y=list(); works just as well

Managed to shave off a few bytes in my answer :) https://codegolf.stackexchange.com/a/120024/59530

Perl 6,  36 32  29 bytes
->\a{map {a.grep(*==$_):k},1..a.max}

Try it
{map {.grep(*==$^a):k},1.. .max}

Try it
{map {.grep($^a):k},1.. .max}

Try it

Expanded:
{  # bare block lambda with implicit parameter ｢$_｣

  map

    {  # bare block lambda with placeholder parameter ｢$a｣

      .grep(  # grep for the values in ｢$_｣
        $^a   # that are equal to the currently tested value (and declare param)
      ) :k    # return the key (index) rather than the value
    },

    1 .. .max # Range from 1 to the maximum value in ｢$_｣

}

Returns zero based indexes, to get 1 based use cross operator (X) combined with + op. (33 bytes)
{1 X+.grep($^a):k}

To get it to return Sets just add set in there (total 37 bytes)
{set 1 X+.grep($^a):k}

Röda, 51 bytes
f s{seq(1,max(s))|[[s()|enum|[_2+1]if[_1=i]]]for i}

It's a port of the Python answer by Uriel.
Another version (88 bytes):
f a{I=indexOf;seq(1,max(a))|{|i|b=a[:]c=[]x=1{c+=x+I(i,b)b-=i;x++}until[I(i,b)<0];[c]}_}

Try it online!
Both a 1-indexed.

Mathematica 62 bytes
(Y={}~Table~Max@#;Y[[#[[j]]]]~AppendTo~j~Table~{j,Tr[1^#]};Y)&

I'll run it for you
(Y={}~Table~Max@#;Y[[#[[j]]]]~AppendTo~j~Table~{j,Tr[1^#]};Y)&[{4,5,2,3,3,8,6,3}]

{{}, {3}, {4, 5, 8}, {1}, {2}, {7}, {}, {6}}

Try it online (just paste the code with ctrl-v and press shift+enter)
don't forget to paste the input list at the end like in the example above

Welcome to PPCG! You can save a byte by using infix notation for AppendTo. Also, {j,1,Length[#1]} could just be {j,Length@#}, or even shorter, {j,Tr[1^#]}. Tr[1^#] is a pretty common trick to save a byte over using Length.

Bash, 109 bytes
Too bad there is no built-in for array max value.
a=($@)
for((x=m=1;x<=m;x++)){ for((y=0;y<$#;)){((m<a[y]))&&((m=a[y]));((a[y++]==x))&&printf "%d " $y;};echo;}

Try it online!

PowerShell, 81 bytes
$args[0]|%{if($_-gt($c=$r.count)){$r+=@($t)*($_-$c)}$r[--$_]+=,++$i};$r|%{"{$_}"}

Try it online!
1-indexed.

05AB1E, 10 bytes
ZFā¹N-Ïˆ}¯

Try it online!

GNU Make, 214 213 208 204 bytes
X=$(MAKECMDGOALS)
M=0
P=$(eval N=$(word $1,$X))$(if $N,$(if $(shell dc -e$Nd$Mds.\>.p),$(eval M=$N),)$(eval A$N+=$1$(call $0,$(shell expr $1 + 1))),)
$(call P,1)$(foreach K,$(shell seq $M),$(info $(A$K)))

I/O: input array via arguments, output to stdout, one per line, separated by spaces.
$ make -f swap.mk 2 2 2

3 2 1
make: *** No rule to make target `2'.  Stop.

Explanation
X=$(MAKECMDGOALS)     # Input array
M=0                   # Max value encountered in X
P=$(eval
    N=$(word $1,$X))  # Get next word from X
  $(if $N,$(if $(shell dc -e$Nd$Mds.\>.p),
    $(eval M=$N),)    # Update M
    $(eval A$N+=$1    # Append index to a variable named after value
      $(call $0,      # Recurse (call returns empty string)
        $(shell expr $1 + 1))),)
$(call P,1)           # Initial call to P. 1 is the first index
$(foreach K,          # Print all values of A* variables
  $(shell seq $M),
  $(info $(A$K)))     # Uninitialized ones default to empty strings

The order of indices in sets is reversed because P calls itself recursively before updating A$2 (call executed in the evaluation of the right-hand side).

Does make have any way to do arithmetic itself? Calling into external programs to do it feels a bit like cheating, because you could probably put much more of the algorithm into those programs and end up with a shorter program.

@ais523 It has not. Previous version used bc and grep. I could also use test and $?. dc has a terser syntax, but frankly all of these feel the same.

Common Lisp, 91 bytes
(lambda(x &aux(l(make-list(eval`(max,@x))))(i 0))(dolist(y x l)(push(incf i)(nth(1- y)l))))

1-based indexing, returns the sets as lists.
Try it online!

k, 13 bytes
{(=x)@!1+|/x}

This is 0-indexed.
Try it online!
{           } /function(x)
 (=x)         /make a map/dictionary of values to their indices
         |/x  /get maximum value in x
      !1+     /make a range from 0 to the value, inclusive
     @        /get map value at each of the values in the range
              /    0N is given where there is no result

Uiua, 6 bytes
⊕□∶⇡⧻.

Try it!
0-indexed.
⊕□∶⇡⧻.
     .  # duplicate
    ⧻   # length
   ⇡    # range
  ∶     # swap
⊕□      # group by box

Japt, 7 bytes
Output is 0-based.
rÔõ@ð¶X

Try it

Vyxal, 38 bitsv2, 4.75 bytes
Gǒ=vT

Try it Online!
Bitstring:
01011011100001100011111110111100010001

Exact same algorithm as Jelly, independently discovered.
Explained
Gǒ=vT
 ǒ     # Reduce pairs in the cartesian product of
# the input
G      # and the maximum of the input
  =    # by equality
# This creates a list of [1s in places where input == x for x in range(max(input))]
   vT  # Get the indices of those 1s for each list

Created with the help of Luminespire.

JavaScript (Node.js), 73 bytes
x=>x.map((n,i)=>A[(g=n=>n&&g(n-1,A[n]=A[n]||[]))(n),n].push(i),A=[[]])&&A

Try it online!

source: Stack Exchange

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

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

sort: votes


text:
Raise integer x to power x, without exponentiation built-ins
Task - The title pretty much sums it up: raise an integer x to power x, where 0<x.
Restrictions:

Use of exponentiation, exp(), ln(), and any other powers-related language built-ins, like pow(), x^x, x**x is forbidden.
You can assume that the given integer fits the limits of the programming language of your choice.

Test cases:
Input | Output
---------------
2     | 4
3     | 27
5     | 3125
6     | 46656
10    | 10000000000

This is code-golf, so the shortest program in bytes wins.

Can we accept input as a string?

I have made an edit to this, hoping it will be reopened. I deleted rule 3 and instead stated that it should be a full program, as the OP probably intended

Much better, @Mr.Xcoder but I suggest removing (or rewording) the second restriction. Does "not a function" exclude JS from participating? I'd also suggest, for the purposes of the challenge, that we should have to handle 0 and that the expected output be specified (0 or 1 or either). Finally, having to handle negative integers would be a nice addition to the challenge.

@Shaggy added js back in... calculated 0^0 on the apple calculator and it returned 1. Maybe 1 should be the chosen value, because Python also returns 1 for 0^0. However, Foundation+ Swift returns 0

@Mr.Xcoder, outputting 0 might present more of a challenge in some languages (it'd add 3 bytes to my answer!) but either option works for me.

I'm not sure how to interpret "The program must not handle 0". Should that be "need not handle" instead? 2. At present the majority of the answers to this question don't follow the rule that the answer must be a full program. I'm not sure why @Mr.Xcoder added that requirement, but I don't think the question should be reopened until the question is consistent with the existing answers (either because the requirement is removed or because the offending answers have been deleted).

@PeterTaylor that's what the OP initially stated, ambiguously though, I will remove that rule. For (1) I will reword that

@PeterTaylor Done, now it's consistent with the answers.

@Mr.Xcoder, I've removed the "restriction" that we need not handle 0 and instead specified that 0<x in the lead-in. I also removed the restriction that code shouldn't throw errors; that should go without saying. Feel free to roll back if necessary.

@Shaggy it's a good edit, now covers everything well

@Shaggy and what was wrong with my good luck wish?))))

@Mr. Xcoder for C, i suppose this will be an function int f(x), which will compile in gcc and ms visual studio. so we can put that code in some code.h file. then make our test program like follows: #include <stdio.h> #include "code.h" int main() {  int i;  for(i=1; i<11;i++)   printf("%u %u\n", i, f(i));  return 0; }  bytesize of code.h is measured

Next time: Evaluate the xth hyperoperation of x

@xakepp35 people (for some reason) on this site dislike wishing people luck. And it was Peter Taylor, not Shaggy who deleted it.

The challenge allows $x=0$ to have undefined behavior, and that's fine... but I wish answers that took advantage of this (most of which return $0$ in that case) would also show an alternative answer that returns $1$, as it's generally accepted that $0^0=1$. I also wish answers in languages that have a shorter built-in would mention what that built-in is. This is how I feel in general regarding challenges with clauses of this kind (especially when the question asked is quite fundamental), of which there are many on CGCC.

@MatthewRoh : sure …. then we won't many test cases to work with at all - 9^9^9 is already 1.22 billion bits, larger than what gnu GMP is willing to return, while 10^10^10 is a lovely 33.2193 billion bits. Luckily for us, 8^8^8 is only ~ 2^2^25.58

Python, 25 bytes
lambda n:eval('1'+'*n'*n)

Try it online!

APL (Dyalog), 4 bytes
For xx, takes x as left argument and x as right argument.
×/⍴⍨

Try all cases online!
×/ product of
⍴⍨ arg copies arg
And here here is one that handles negative integers too:
×/|⍴|÷1⌊|×⊢

Try all cases!
×/ the product of
| absolute value
⍴ repetitions of
| the absolute value
÷ divided by
1⌊ the Lesser of 1 and
| the absolute value
× times
⊢ the argument
The built-in Power primitive is:
x*y

In the one for negative numbers you used power

@Joao-3 Thanks. Fixed both that and the wrong result. Was just an extra thing, anyway.

When you forget that multiplication is not asterisk...

Mathematica, 16 bytes
I've got two solutions at this byte count:
1##&@@#~Table~#&

Here, #~Table~# creates a list of n copies of n. Then the List head is replaced by 1##& which multiplies all its arguments together.
Nest[n#&,1,n=#]&

This simply stores the input in n and then multiplies 1 by n, n times.

#~Product~{#}&

@alephalpha ah, good point. You can post that as a separate answer.

R, 22 bytes
reads x from stdin.
prod(rep(x<-scan(),x))

generates a list of x copies of x, then computes the product of the elements of that list. When x=0, the rep returns numeric(0), which is a numeric vector of length 0, but the prod of that is 1, so 0^0=1 by this method, which is consistent with R's builtin exponentiation, so that's pretty neat.
Try it online!

Dang, I find a challenge where I am positive I've come up with an excellent solution exactly like this and you've beat me. And beat me by 3 years! I've barely been on Code Golf for a year now!

JavaScript (ES6), 33 28 25 24 bytes
n=>g=(x=n)=>--x?n*g(x):n

Try It

f=
n=>g=(x=n)=>--x?n*g(x):n
o.innerText=f(i.value=3)()
i.oninput=_=>o.innerText=f(+i.value)()
<input id=i min=1 type=number><pre id=o>

History
25 bytes
f=(n,x=n)=>--x?n*f(n,x):n

28 bytes
n=>eval(1+("*"+n).repeat(n))

33 bytes
n=>eval(Array(n).fill(n).join`*`)

Regex  (ECMAScript+(?^*)RME), 13 bytes
^(x(?^*x+))*$

Takes its input in unary, as a string of x characters whose length represents the number. Returns its output as the number of ways the regex can match. (The rabbit emoji indicates this output method. It can yield outputs bigger than the input, and is really good at multiplying.)
Try it on replit.com
This version uses molecular lookinto, a new feature in RegexMathEngine. The basic form (?^*...) matches the expression inside it against the entire input string. (With a parameter, it evaluates it against the contents of a backreference, e.g. (?^5*...) to look into \5.)
On every iteration of the outer loop, there are \$n\$ possible matching states of the inner loop, and at the end of \$n\$ iterations, the match is complete. In a complete match, each iteration can independently be at any one of \$n\$ states, so there are \$n^n\$ total possible matches.
Changing the * at the end to + would make it give a result of \$0\$ for \$n=0\$.
^           # tail = N = input number
(
    x       # tail -= 1
    (?^*    # Non-atomic lookinto - starts with tail = N
        x+  # Create a choice between N possibilities
    )
)*$         # Loop as many times as possible, minimum 0. This will loop N times,
            # because it subtracts 1 from tail on each iteration. The minimum of
            # 0 iterations gives a correct result of 1 for N==0.

The constant-power \$n^k\$ version of this can be seen in Quartic Summation, for which there is also a method that doesn't require non-atomic lookaround. It might be impossible to implement \$n^n\$ without non-atomic lookaround, due to it being impossible to create \$m\$ number of choices (with the value \$m\$ being accessed via a backreference) without the guarantee of having \$O(m)\$ avaiable space.
The constant-base \$k^n\$ version of this would be e.g. ^((.+)*)+ or ^(x(||))*$ for \$3^n\$.
Regex  (PCRE2 v10.35+), 26 bytes
^(x((?<*(?*^x+|(?2)).)))*$

Attempt This Online!
This solution uses non-atomic recursion, lookahead, and lookbehind to emulate non-atomic variable-length lookbehind. The algorithm used is the same as that of the 13 byte version.
^                           # tail = N = input number
(
    x                       # tail -= 1
    (                       # Define subroutine (?2)
        (?<*                # Non-atomic lookbehind
            (?*             # Non-atomic lookahead
                ^           # If we've reached tail==0, then:
                x+          # create a choice between N possibilities.
            |
                (?2)        # Otherwise, recursively call (?2).
            )
            .               # tail += 1 (Go back 1 character at a time)
        )
    )
)*$                         # Loop as many times as possible, minimum 0. This
                            # will loop N times, because it subtracts 1 from
                            # tail on each iteration. The minimum of 0 iterations
                            # gives a correct result of 1 for N==0.

The equivalent in a hypothetical engine with real (not emulated) non-atomic variable-length lookbehind would be ^(x(?<*^x+.*))*$ (16 bytes).
Regex  (PCRE2 v10.35+ without lookbehind), 59 bytes
^(?=(x*)\1(x?))(((?*x+(?!\1)()?|\2+$))x(?(?=\2\1)(?4)))*\1$

Attempt This Online!
This demonstrates this to be possible without the use of lookbehind or recursion. It works by emulating operation on \$n\$ within the space of \$n/2\$, using one of those halves as a counter for the outer loop, and the other half for the inner loop.
(I wrote this version on July 29, and am finally posting it now.)
^                         # Anchor to start; tail = N = input number
(?=(x*)\1(x?))            # \1 = floor(N / 2); \2 = N % 2
(
    (                     # Define subroutine (?4):
        (?*
            x+(?!\1)      # Add \1 to possibility count
            ()?           # Double the possibility count of the above
        |
            \2+$          # If \2==1, add 1 to possibility count
        )
    )
    x                     # tail -= 1
    (?(?=\2\1)            # If tail ≥ \2 + \1:
        (?4)              # Call subroutine (?4), to multiply its possibility
                          # count with the above
    )
)*                        # For every possible iteration count, from 0 to the
                          # maximum, add the above to the possibility count
\1$                       # Assert tail == \1

Regex  (ECMAScript+(?*)RME / PCRE2 v10.35+), 81 bytes
^(?=(x*)\1(x?))((?*x+(?!\1)(|)|\2+$)x((?=\2\1)(?*x+(?!\1)(|)|\2+$)|(?!\2\1)))*\1$

Try it on replit.com - RegexMathEngine
Attempt This Online! - PCRE2 v10.40+
This is a port of the 59 byte version. Basic ECMAScript lacks not only lookbehind, but subroutine calls and conditionals as well. The only feature added to basic ECMAScript is (?*...), molecular lookahead (a.k.a. non-atomic lookahead). Note that (|) must be used instead of ()? due to ECMAScript's no-empty-optional rule.
(I wrote this version on July 29, and am finally posting it now.)
^                         # Anchor to start; tail = N = input number
(?=(x*)\1(x?))            # \1 = floor(N / 2); \2 = N % 2
(
    (?*                   # Define "subroutine":
        x+(?!\1)          # Add \1 to possibility count
        (|)               # Double the possibility count of the above
    |
        \2+$              # If \2==1, add 1 to possibility count
    )
    x                     # tail -= 1
    # Multiply the above possibility count with the following:
    (                     # Emulated conditional, upon whether tail ≥ \2 + \1
        (?=\2\1)          # If yes:
        # Call "subroutine" (duplicates it, since this regex flavor lacks
        # subroutine calls) to multiply with the above possibility count
        (?*
            x+(?!\1)
            (|)
        |
            \2+$
        )
    |
        (?!\2\1)          # If no: Use possibility multiplier of 1
    )
)*                        # For every possible iteration count, from 0 to the
                          # maximum, add the above to the possibility count
\1$                       # Assert tail == \1

Standard ML, 42 bytes
fn x=>foldl op*1(List.tabulate(x,fn y=>x))

Try it online!
Explanation:
fn y => x                 (* An anonymous function that always returns the inputted value *)
List.tabulate(x, fn y=>x) (* Create a list of size x where each item is x *)
foldl op* 1               (* Compute the product of the entire list *)

Welcome to PPCG!

TIO has MLton now. https://tio.run/nexus/sml-mlton#@1@WmKNQkF@eWqRgq5CWp1Bha5eWn5OSo5BfoGWo4ZNZXKJXkphUmpNYkqpRoQNUUGlrV6Gpac1VUJSZV6Kg4ZkHVJAfXALkpStoQAwyA8r//w8A

Oh that's awesome! Thanks!

Pure bash, 43
echo $[$1<2?1:$[$1<2?2:$1]#`printf 1%0$1d`]

Try it online.
Not sure if this is bending the rules too much - I'm not using any of the listed banned builtins, but I am using base conversion.

printf 1%0$1d outputs a 1 followed by n 0s
$[b#a] is an arithmetic expansion to treat a as a base b number, which gives the required result.  Unfortunately base <2 does not work, so the extra ?: bits handle input n=1.

Maximum input is 15, because bash uses signed 64-bit integers (up to 231-1).

Same problem as I had, this doesn't work for x=1. Nonetheless, very interesting approach.

@MaxLawnboy Thanks for pointing that out - that sadly bloated my answer.  Perhaps I can figure out another shorter version...

Cool stuff. Always wished to learn bash, but always been too lazy for it =)

Alice, 13 bytes
/o
\i@/.&.t&*

Try it online!
Explanation
/o
\i@/...

This is a framework for programs that read and write decimal integers and operate entirely in Cardinal mode (so programs for most arithmetic problems).
.    Duplicate n.
&.   Make n copies of n.
t    Decrement the top copy to n-1.
&*   Multiply the top two values on the stack n-1 times, computing n^n.

Nibbles, 3 2.5 bytes (6 5 nibbles)
`*^$_

Attempt This Online!
Returns the correct answer of \$1\$ for an input of \$0\$, as it is generally accepted that \$0^0=1\$ (even though this challenge doesn't require it, and several of the other answers take advantage of this and return \$0\$, or loop infinitely, for an input of \$0\$).
The ASCII representation uses ^, but in this context it's a Replicate operator, not exponentiation.
Explanation, shown with example input of 7:
`*^$_
    _     # Input coerced to a list: [7]
   $      # Input: 7
  ^       # Replicate: [7, 7, 7, 7, 7, 7, 7]
`*        # Product (returns 1 for an empty list): 823543

The builtin is just 0.5 bytes (1 nibble):
^

Attempt This Online!

Input-coerced-to-a-list is clever.  Well done.  And it's great to have more nibbles competition...

@DominicvanEssen Thanks! It was your answer that inspired me to try. (And I didn't realize _ could do that until I started using p. The documentation was a bit unclear on that.)

Uiua, 4 bytes
/×▽.

Try it!
  ▽.  # list of N Ns
/×    # product

Note: can also do /×↯.

05AB1E, 3 bytes
.DP

Try it online! or Try all examples
.D  # pop a,b    push b copies of a
    # 05AB1E implicitly takes from input if there aren't enough values on the stack
    # For input 5, this gives us the array: [5,5,5,5,5]
  P # Take the product of that array
    # Implicit print

Looks like you enjoyed .D. First time I've seen it used.

ah, i dont get what is happening here.. seems to be too exotic and no explanation on how that works.  =(

@xakepp35 Does that help?

.D can be и for -1 (probably a builtin that wasn't available before?)

Cubix, 19 bytes
..@OI:1*s;pu!vqW|($

Try it online!
Step by Step
Expands out onto a cube with side length 2
    . .
    @ O
I : 1 * s ; p u
! v q W | ( $ .
    . .
    . .

I:1 Takes the input, duplicates it and pushs 1.  This sets up the stack with a counter, multiplier and result.
*s; Multiples the TOS, swaps the result with previous and remove previous.
pu Bring the counter item to the TOS.  U-turn.  This use to be a lane change, but needed to shave a byte.
|($ This was done to save a byte.  When hit it skips the decrement. reflects, decrements the counter and skips the no op wrapping around the cube.
!vqW Test the counter.  If truthy skip the redirect, put the counter on BOS, change lane back onto the multiplier.  Otherwise redirect.
|sO@ this is the end sequence redirected to from counter test.  Goes past the horizontal reflect, swaps the TOS bringing result to the TOS, ouput and halt.

Jelly, 3 bytes
ẋ⁸P

Try it online!
How?
ẋ⁸P - Main link: x             e.g. 4
 ⁸  - link's left argument, x       4
ẋ   - repeat left right times       [4,4,4,4]
  P - product                       256

Darn, I wanted to do this. :P

@Jonathan Allan is it 3 bytes, or 3 wide-characters? let us view source code hex dump, please, to make correct decision on actual code bytesize. ;-) and make the corrections

@xakepp35 Jelly uses a SBCS and the bytes link in the header points to it. The program with hexdump F7 88 50 works as intended.

@Dennis thanks for reply! i could not ever imagine such a language before =)

Ruby, 20 18 bytes
-2 bytes because the spec changed and I no longer need an exponent argument.
->x{eval [x]*x*?*}

Try it online!

x86_64 machine language for Linux, 14 11 10 bytes
0:   6a 01                   pushq  $0x1
2:   58                      pop    %rax
3:   89 f9                   mov    %edi,%ecx
5:   f7 ef                   imul   %edi
7:   e2 fc                   loop   5
9:   c3                      retq

To Try it online!, compile and run the following C program.
const char h[]="\x6a\1\x58\x89\xf9\xf7\xef\xe2\xfc\xc3";

int main(){
  for( int i = 1; i < 4; i++ ) {
    printf( "%d %d\n", i, ((int(*)())h)(i) );
  }
}

Vyxal, 2 bytes
ẋΠ

Try it Online!

Desmos, 19 17 bytes
f(x)=∏_{n=1}^xx

Try it on Desmos!
The ^ is not used for exponentation in this case.
-2 bytes thanks to Aiden Chow.

The brackets around the x can be removed and it will still parse fine, so f(x)=∏_{n=1}^xx.

Haskell, 24 23 21 bytes
f y=product$y<$[1..y]

Try it online!

Saved 1 byte, thanks to Laikoni
Saved 2 bytes, thanks to nimi

f y=foldr1(*)$y<$[1..y] is a byte shorter.

product$y<$[1..y]

Not sure how I managed to forget about product, thanks! :D

Stacked, 10 bytes
{!1[n*]n*}

Try it online!
Two-argument exponentiation for the same size:
{%1[x*]y*}

Both are functions. Repeats a function that multiplies 1 by n n times.

Scala, 32 26 bytes
n=>List.fill(n)(n).product

Try it online! (Added conversion to long in the TIO so it wouldn't overflow on n=10.)

x86 machine code (Linux), 18 bytes
31 c0 ff c0 31 db 39 df 74 07 0f af c7 ff c3 eb f5 c3

It expects a C declaration as follows extern int XpowX(int).
Disassembled
XpowX:
  # edi : input register
  # ebx : counter
  # eax : result register
  xor  %eax, %eax    # result  = 0
  inc  %eax          # result += 1
  xor  %ebx, %ebx    # counter = 0
  loop:
    cmp  %ebx, %edi  # if (counter == input)
    je   done        #   return result
    imul %edi, %eax  # result  *= input
    inc        %ebx  # counter += 1
    jmp   loop
  done:
    ret

Japt, 4 bytes
ÆUÃ×

Try it online!
Explanation
ÆUÃ×       // implicit: U = input integer
Uo{U} r*1  // ungolfed

Uo{ }      // create array [0, U) and map each value to...
   U       //   the input value
      r*1  // reduce with multiplication, starting at 1
           // implicit output of result

Rust, 37 bytes
|x|(|mut y|{for _ in 1..x{y*=x}y})(x)

Try it online
This might be able to be shortened once bindings_after_at stabilizes by using |mut y@x| instead.

26 bytes: |x|(1..x).fold(1,|a,_|a*x)

@madlaina Feel free to post that as your own solution! It works differently than mine does and is certainly a lot shorter.

Perl 5 + -p, 17 bytes
$_=eval"$_*"x$_.1

Try it online!

Flurry, 16 bytes
<>{{}}<<>()>{}{}

Run example
$ ./flurry -nin -c "<>{{}}<<>()>{}{}" 4
256
$ ./flurry -nin -c "<>{{}}<<>()>{}{}" 5
3125

Multiply n n times to 1. The lambda expression is n (\x. \y. n (x y)) I where \y. n (x y) or n ∘ x is the product of Church numeral of n and x, and its SKIB-transformation is as follows:
n (\x. \y. n (x y)) I
S I (\n. \x. \y. n (x y)) n I
S I (\n. \x. S (K n) x) n I
S I (\n. S (K n)) n I
S I (S ∘ K) n I

So the direct translation of this expression into Flurry gives the code above.
Expanding the S in front gives n ((S ∘ K) n) I, which does not change bytes:
({})[<<>()>{}]{}

If direct exponentiation is allowed, it is 6 bytes: ({}){} (pop n, push n, pop n; evaluates to n n), because n m evaluates to m^n when n and m are Church numerals.

1+, 29 27 25 24 bytes
1."1##/"\*\1+\"/^"/<1+#:

This was already shockingly short, given how messy it is to create a halting loop... I did a poor job on stack manipulation, so it can probably be improved.
Special notes on 25 -> 24

Remember that you're programming in brainfuck. It's tempting to avoid confusion and tedium by thinking in terms of higher-level abstractions as much as possible, rather than thinking in brainfuck. This can buy enough control to make a working program, usually at the cost of such inefficiencies as:
-excessive pointer movement, sometimes as simple as ">+<->" and sometimes less apparent; often a result of doing things in an intuitively appealing order. -- Daniel B. Cristofani

This applies to 1+ as well. I designed this program with pseudo-code, which results in two consecutive /s - cuz there are only three elements on the stack, replacing it with \ saves one byte.

Arn, 8 bytes
xõPÑ_=>$

Explained
Unpacked: *v{_}\1=>
    \        Fold...
*            ...with multiplication after...
v{           ...mapping with key of v...
  _          ...by replacing with input
}            End map
      1      Literal one
        =>   inclusive range to...
          _  ...input, implied

Wow, nice language! I like how the source code is compressed from a readable notation.

Thanks! Glad you like it :)

UPDATE 2 ::
and finally, the super overskill version that uses binary squaring algorithm, safely catches division by zero, and  properly handles negative integer bases and negative integer exponents — that's quite a nifty bit of data sanity checking and edge case handling for 3 lines of code that has no hard-coded constants at all, plus avoiding use of the exponentiation operator (^ or **)
Center column is function output, and right most column is reference output.
It could even handle some extremely large magnitude negative exponents, like x^x for :
-16777213  ^  ()  -5.53904374025776e-121210664
                  -5.53904374025776e-121210664

-log(!_) exists within the function merely to return +inf

for __ in -3 -2 -1 0 '' -0 1 2 3; do

    jot 13 -4 |

    gawk -v PREC=2000 -Mbe '

    func ____(___,__,_){return(__+=(_="")<__?_:___)<++_\
        ?(!__?_:___?_/____(___,-__):-log(!_)):__<++_?___\
        :(__%_?___:!!_)*____(___*___,int(__/_))

    } BEGIN { CONVFMT = "%.15g"
           _ = ""
    } ($++NF = " ^ (" (___) ")")^_ + \
      ($++NF = "|" ____(__=$!_,___))^_ + \
      ($++NF = "|" __^(_<___?___:__))' ___="$__"

done

     1  -4  ^  (-3)  -0.015625            -0.015625
     2  -3  ^  (-3)  -0.037037037037037   -0.037037037037037
     3  -2  ^  (-3)  -0.125               -0.125
     4  -1  ^  (-3)  -1                   -1
     5  0   ^  (-3)  +inf                 +inf
     6  1   ^  (-3)  1                    1
     7  2   ^  (-3)  0.125                0.125
     8  3   ^  (-3)  0.037037037037037    0.037037037037037
     9  4   ^  (-3)  0.015625             0.015625
    10  5   ^  (-3)  0.008                0.008
    11  6   ^  (-3)  0.00462962962962963  0.00462962962962963
    12  7   ^  (-3)  0.00291545189504373  0.00291545189504373
    13  8   ^  (-3)  0.001953125          0.001953125

    14  -4  ^  (-2)  0.0625               0.0625
    15  -3  ^  (-2)  0.111111111111111    0.111111111111111
    16  -2  ^  (-2)  0.25                 0.25
    17  -1  ^  (-2)  1                    1
    18  0   ^  (-2)  +inf                 +inf
    19  1   ^  (-2)  1                    1
    20  2   ^  (-2)  0.25                 0.25
    21  3   ^  (-2)  0.111111111111111    0.111111111111111
    22  4   ^  (-2)  0.0625               0.0625
    23  5   ^  (-2)  0.04                 0.04
    24  6   ^  (-2)  0.0277777777777778   0.0277777777777778
    25  7   ^  (-2)  0.0204081632653061   0.0204081632653061
    26  8   ^  (-2)  0.015625             0.015625

    27  -4  ^  (-1)  -0.25                -0.25
    28  -3  ^  (-1)  -0.333333333333333   -0.333333333333333
    29  -2  ^  (-1)  -0.5                 -0.5
    30  -1  ^  (-1)  -1                   -1
    31  0   ^  (-1)  +inf                 +inf
    32  1   ^  (-1)  1                    1
    33  2   ^  (-1)  0.5                  0.5
    34  3   ^  (-1)  0.333333333333333    0.333333333333333
    35  4   ^  (-1)  0.25                 0.25
    36  5   ^  (-1)  0.2                  0.2
    37  6   ^  (-1)  0.166666666666667    0.166666666666667
    38  7   ^  (-1)  0.142857142857143    0.142857142857143
    39  8   ^  (-1)  0.125                0.125

    40  -4  ^  (0)   1                    1
    41  -3  ^  (0)   1                    1
    42  -2  ^  (0)   1                    1
    43  -1  ^  (0)   1                    1
    44  0   ^  (0)   1                    1
    45  1   ^  (0)   1                    1
    46  2   ^  (0)   1                    1
    47  3   ^  (0)   1                    1
    48  4   ^  (0)   1                    1
    49  5   ^  (0)   1                    1
    50  6   ^  (0)   1                    1
    51  7   ^  (0)   1                    1
    52  8   ^  (0)   1                    1

    53  -4  ^  ()    0.00390625           0.00390625
    54  -3  ^  ()    -0.037037037037037   -0.037037037037037
    55  -2  ^  ()    0.25                 0.25
    56  -1  ^  ()    -1                   -1
    57  0   ^  ()    1                    1
    58  1   ^  ()    1                    1
    59  2   ^  ()    4                    4
    60  3   ^  ()    27                   27
    61  4   ^  ()    256                  256
    62  5   ^  ()    3125                 3125
    63  6   ^  ()    46656                46656
    64  7   ^  ()    823543               823543
    65  8   ^  ()    16777216             16777216

   (trimming out the -0 exponent ones since they're same as +0)

    79  -4  ^  (1)   -4                   -4
    80  -3  ^  (1)   -3                   -3
    81  -2  ^  (1)   -2                   -2
    82  -1  ^  (1)   -1                   -1
    83  0   ^  (1)   0                    0
    84  1   ^  (1)   1                    1
    85  2   ^  (1)   2                    2
    86  3   ^  (1)   3                    3
    87  4   ^  (1)   4                    4
    88  5   ^  (1)   5                    5
    89  6   ^  (1)   6                    6
    90  7   ^  (1)   7                    7
    91  8   ^  (1)   8                    8

    92  -4  ^  (2)   16                   16
    93  -3  ^  (2)   9                    9
    94  -2  ^  (2)   4                    4
    95  -1  ^  (2)   1                    1
    96  0   ^  (2)   0                    0
    97  1   ^  (2)   1                    1
    98  2   ^  (2)   4                    4
    99  3   ^  (2)   9                    9
   100  4   ^  (2)   16                   16
   101  5   ^  (2)   25                   25
   102  6   ^  (2)   36                   36
   103  7   ^  (2)   49                   49
   104  8   ^  (2)   64                   64

   105  -4  ^  (3)   -64                  -64
   106  -3  ^  (3)   -27                  -27
   107  -2  ^  (3)   -8                   -8
   108  -1  ^  (3)   -1                   -1
   109  0   ^  (3)   0                    0
   110  1   ^  (3)   1                    1
   111  2   ^  (3)   8                    8
   112  3   ^  (3)   27                   27
   113  4   ^  (3)   64                   64
   114  5   ^  (3)   125                  125
   115  6   ^  (3)   216                  216
   116  7   ^  (3)   343                  343
   117  8   ^  (3)   512                  512

====================================

UPDATE 1 ::: The shorter version that only does x^x, w/o binary squaring
jot 15 0 |

gawk 'func ___(__,_){$NF*=(__+=(""~__)*($++_+=!$_))>_?$_ ___(--__):_}!___()'

1
1
4
27
256
3125
46656
823543
16777216
387420489
10000000000
285311670611
8916100448256
302875106592253
11112006825558016

====================================

awk - a LOT of bytes (123 ?, per Deadcode), but it includes the full recursive binary squaring algorithm tailored for x^x without using any alphanumerics (other than unavoidable keywords like function and return) or the power (^ | **) operator :
jot 14 |

mawk 'function ____(__,___,_){return(___+=((_="")==___)*__)<(_+=++_)?\
           __+!+__:(___%_?__:!!_)*____(__*__,int(___/_))}$++NF=____($_)'

0 1
1 1
2 4
3 27
4 256
5 3125
6 46656
7 823543
8 16777216
9 387420489
10 10000000000
11 285311670611
12 8916100448256
13 302875106592253
14 11112006825558016

Yes this is code golfing so mine is equivalent to Tiger Woods doing 10 strokes at a par 3 in Augusta, but unlike most other entries, this one scales nicely even for extremely large inputs, AND, also being POSIX-compliant (not that it matters for golfing)

This appears to be 123 bytes: Try it online!

Thunno D, \$5\log_{256}(96)\approx\$ 4.12 bytes
ZOA*P

Attempt This Online!
Note: the built-in solution would have been just one character: ^ or @ (either would work).
Explanation
ZOA*P # Implicit input
ZO    # Wrap the input in a list
  A*  # Repeat it input times
    P # Take the product of this list
      # Implicit output

Fortran (GFortran), 73 bytes
integer(selected_int_kind(32))::n
read*,n;print*,product([(n,j=1,n)]);end

Try it online!.
Uses a larger integer type because the implicit integer type overflows doing 10**10. This solution can compute results up to 170141183460469231731687303715884105727.
We make an inline anonymous array of ns : [(n,j=1,n)], take the product(), and print the result.

Nibbles, 3 bytes (6 nibbles)
/,$*_@

/,$*_@
/           # fold from right over
 ,$         # 1..input
   *        # multiplying
     @      # result-so-far with
    _       # input

Rattle, 8 bytes
|$+[*~]~

Try it Online!
I posted the 9-byte answer and immediately found a way to improve it. This method uses $ to swap the top of the stack with the existing value in memory (0) then increments to get 1. It otherwise follows the same logic.
Rattle, 9 bytes
|s=1[*~]~

Try it Online!
Explanation
|            parse input
 s           save input to memory
  =1         set top of stack to 1
    [  ]~    loop n times where n is the value in memory
     *~      multiply the top of the stack by the value in memory
             (print implicitly)

How many more bytes would it take to work with an input of 0?

@Deadcode depends if you think 0^0=1

Rattle itself thinks 0^0=1, so that is indeed Rattle's own exponentiation operator reimplemented (for nonnegative integer input) without using it, in 13 bytes.

@Deadcode that's right, it would be 13 bytes if it had to handle x=0 (possibly less if someone thinks of a more elegant solution). However 0<x for this question. Good observation though, I never considered the 0^0 case when implementing exponentiation in Rattle but I'm glad it ended up being 1 because that's the right answer imo

If you had read my Nibbles answer or my comment you'd know that I know it's 0<x for this question. That doesn't change that it's an interesting extension of this question. Should we always ignore such items of interest just because they go beyond the question? There's no other place on the site where this could go, since the same question but 0≤x would get closed as a duplicate.

@Deadcode agreed, always good to take it a step further. Unfortunately taking it further makes my answer 13 bytes instead of 8 because it just adds an if case, maybe I should see if I can find a better way

Sorry for my over-defensive reply :-) I do think this could have been (or maybe still could be?) fixed in the Rattle language itself, which would let the 8 byte program handle 0. Is there any useful reason Rattle should loop infinitely when given a loop iteration count of 0? Does it need to keep doing this to maintain compatibility with existing Rattle programs?

@Deadcode you make a very good point, it is a little annoying that it loops infinitely here. Maybe an infinite loop should only occur if the argument is explicitly 0 (e.g. ]0), and loop 0 times if implicitly 0 (e.g. ]~ where the value at the pointer is 0). Currently ]0 is equivalent to while(true)

vemf, 6 3 bytes
-3 bytes thanks to language creator
┴‼*

try it online (uses 3 as example)
Explanation:
┴‼*
┴   ' do this function with the same value for both arguments
 ‼  '   repeat each element of [left] the-element-at-the-corresponding-index-of-[right] times
  * ' multiply elements of resulting list

PowerShell, 20 bytes
@($n)*$n-join"*"|iex

Try it online!
Explanation
@($n)*$n-join"*"|iex    # full command
@($n)                   # array consisting of single element
*$n                     # multiply the array element x times
-join"*"                # joins all elements with * separating (3*3*3)
|iex                    # executes the provided expression

Go, 53 51 bytes
func(n int)int{p,i:=1,0
for;i<n;i++{p*=n}
return p}

Attempt This Online!

-2 by @The Thonnu: anonymous function

I think you can save 2 by making it anonymous: Attempt This Online!

BQN, 4 bytes
×´⥊˜

Try it
  ⥊˜ # a list of N Ns
×´   # product

Rust, 29 26 bytes
Saved 3c
|x|(0..x).fold(1,|a,_|a*x)

|x|(0..x).map(|_|x).product()

Nekomata, 2 bytes
ř∏

Attempt This Online!
ř   Replicate
 ∏  Product

CJam, 7 bytes
ri_a*:*

Try it online!
Explanation
ri       e# Read an int from input
  _      e# Duplicate it
   a*    e# Put the copy in the array and repeat it that many times
     :*  e# Take the product of the array

dc, 24 23 26 22 bytes
This is my first attempt writing a recursive macro in dc. I am sure it is a sub-optimal solution which can be improved a lot.
dsr1+[lrr1-d1<F*]dsFxp

Try it online!
Edit: Thanks eush77! -4 bytes.

Does not work for x=1.

You can shave off two bytes by replacing lr sequences at the end with two ds at the beginning.

Actually, you don't need that. Just increment the top of the stack before calling for the first time. This way you will end up with x copies of x on the stack (and 1 of course), and x multiplications thereafter. So the ending can just be plain dsFxp.

@eush77 I was about to say that removing second lr wouldn't work here. It's my first time golfing in a stack-based language, so it feels very unusual. Thanks for your help!

Perl 6, 13 bytes
{[*] $_ xx$_}

$_ xx $_ evaluates to a list of $_ copies of $_ ($_ being the argument to the anonymous function), and then [*] reduces that list with multiplication.

CJam, 6 bytes
ri_m*,

Try it online!
ri       e# Read integer
  _      e# Duplicate
   m*    e# Cartesian power. The first argument is interpreted as a range
     ,   e# Number of elements. Implicitly display

Retina, 49 46 bytes
Golfed 3 bytes thanks to @Neil
.+
1;$&$*1;$&$*1
{`1(?=1*;(1+);.)
$1
}`1$

\G1

Try it online!
Supports positive integers just as stated in the challenge.

I think you can save a byte by using .+ 1;$&$*1;$&$* instead of your first four lines.

And shave three more off by using \G1 instead of your last three lines.

@Neil Ah, \G, that's a neat trick

Clojure, 22
#(apply *(repeat % %))

:)

Röda, 17 bytes
{product([_]*_1)}

Try it online!
It's an anonymous function that takes it's input from the stream.
Explanation:
{product([_]*_1)}
{               } /* An anonymous function */
         [_]      /* An array containing the input value */
            *_1   /* repeated times the input value */
 product(      )  /* Product of all values in the array */

Batch, 58 bytes
@set n=1
@for /l %%i in (1,1,%1)do @set/an*=%1
@echo %n%

Only works for single-digit inputs due to 32-bit arithmetic.

MacOS Bash, 18
jot -s* -b$1 $1|bc

Try it online.
Also runs on Linux if you install the jot utility:
sudo apt install athena-jot

brainf*ck, 148 bytes
,[->+>+<<]>>[-<<+>>]++++++++[<------<------>>-]<[->>+>>+<<<<]>>[-<<+>>]>>-[-<<<<<[>[>+>+<<-]>>[<<+>>-]<<<-]>>[-<<+>>]>>>]<<<++++++++[-<<++++++>>]<<.

Try it online!
No built-ins ;)
How it works
,                                       - get ascii input
[->+>+<<]                               - duplicate input
>>[-<<+>>]                              - shift inputs left to start
++++++++[<------<------>>-]             - convert ascii into input numbers
<[->>+>>+<<<<]                          - get loop intervals (same as input #)
>>[-<<+>>]                              - shift input back again
>>-[-<<<<<[>[>+>+<<-]>>[<<+>>-]<<<-]>>  - iterated addition (multiplication)
[-<<+>>]>>>                             - Shift output back into input
]<<<++++++++[-<<++++++>>]<<.            - convert final output to ascii

In a nutshell, this works by multiplying x (the input) by itself x times. (a.k.a. iterating iterated addition). The net result is x^x.
I/O
The program takes a single ASCII input, and processes it as it's ASCII index minus 48. The minus 48 is to normalize inputs of actual numbers (4 becomes 52 -> 52-48 -> 4). To input a number higher than 9, use the next corrosponging ASCII character (: -> 58-48 -> 10). The program ouputs in a similar fashion.
Test I/O
INPUT > PROCESSED INPUT >> OUTPUT > TRANSLATED OUTPUT
1 > 1 >> 1 > 1
2 > 2 >> 4 > 4
3 > 3 >> K > 27

Since there are no printable ASCII characters after an input of 3, it can only print numbers in theory. Though, you can check all inputs do in fact work on visualizers such as this.

Brachylog, 6 bytes
g;?j₎×

Try it online!
Explanation
          Example input: 5
g         Group: [5]
 ;?       Pair with the Input: [[5], 5]
   j₎     Juxtapose [5] 5 times: [5, 5, 5, 5, 5]
     ×    Multiply

TI-Basic (TI-84 Plus CE), 9 bytes
prod(seq(Ans,A,1,Ans

Input is from Ans, output is stored in Ans.
Run with 5:prgmNAME:Ans (5 or other input) for visual output.
Generates a list of Ans copies of Ans, then finds the product.

Common Lisp, 59 42 40 bytes
(lambda(x)(apply'*(fill(make-list x)x)))

Try it online!

MATLAB/Octave, 23 bytes
@(n)(prod(n*ones(n,1)))

Python, 32 bytes
f=lambda g,z=1:z>g or g*f(g,z+1)

Try it online!

Welcome to PPCG! You don't need to count the f= part, so you can shorten your submission to 30 bytes.

@Steadybox The f= part does need to be counted, because it's recursive, so it relies upon the function being named f in order to work properly

@musicman523 Yes, you are right.

05AB1E, 2 bytes
G*

Try it online!
Explanation
G*
G  # Do input - 1 times
 *  # Multiply with input

Julia 0.6, 18 bytes
x->prod(x*ones(x))

J, 5 bytes
*/@$~

$~ shapes the argument into a list with as many items as it is, eg, 3 becomes 3 3 3.
@ pipes the result into...
*/ reduce by multiplication

Try it online!

Ly, 16 bytes
ns<l1-[>l*<1-]>u

Being forced to use multiple stacks costs so many bytes...
Try it online!

Google Sheets, 24
Input A1.
=DECIMAL(1&REPT(0,A1),A1

Is base conversion ok? If not, here's one at 26 (but it's really boring):
=PRODUCT(SEQUENCE(A1,1,A1,

Java (JDK), 43+1 bytes
s->{int i=0,t=s;for(;++i<s;t*=s);return t;}

Try it online!
Overflows for 10, so all ints need to be changed to long a the cost of +1. This has been done for the TIO link.
I didn't think I could beat the IntStream though!

Keg, 9 bytes
¿(:;|:)∑*

Try it online!
I said I'd count Keg's victories over 1+ as victories for mawp, so it's 2-1 to mawp!

No way! (15chrs)

@HighlyRadioactive stop vandalising my answer.

stop 2-1ing. (15)

Who's post is this? Huh, looks like it's mine. Leave it alone

@HighlyRadioactive I flagged you for vandalizing a single post 10 times in a row. Stop it, or your account will get suspended.

Rust, 26 bytes
|x|(0..x).fold(1,|a,_|a*x)

Try it online!

MAWP, 40 25 22 bytes
%@![~!~1A]%1A[1A~W~]%:

-15 from Dion's improved input methods.
-3 after modifying first loop to happen x+1 times.
Try it!
Explanation
%@                    Gets multi digit input
![~!~1A]%             x gets cloned x+1 times in the stack
1A[1A~W~]%:           multiplies top 2 numbers x-1 times

1+ wins this time!

@HighlyRadioactive not with the updated input methods... Razetime, come to the rescue! :D

@HighlyRadioactive and they get MAWP... 25 bytes. https://8dion8.github.io/MAWP/?code=%25%40!1A%5B1A~!~%5D%25_1A%5B1A~W~%5D%25%3A&input=13

Dang! That's unfair!! @Dion

@HighlyRadioactive Well, a) I made the changes without seeing this first, and b) Multi-digit input was extremely annoying, so this was something that had to be done. ¯_(ツ)_/¯

@Dion That was meant to be a joke... At some point though 1+ will become a subset of MAWP, and it becomes completely unfair.

Let us continue this discussion in chat.

@Dion 27 bytes in 1+. Let's see if I can golf it further...

@Dion 1+ is at 24 bytes now!! I spent way too much effort on this... But finally, I won!!!

...Lemme see if I can take some more bytes off my 1+ answer. It's already pretty close to optimal afaik... I'm gonna write an auto-optimizer for 1+ (input ungolfed code, output golfed-to-optimal code. Can't support # and functions for obvious reasons, but is otherwise fully functional.)

Integral, 5 Bytes

v↕♦▼e

Try it!
Explanation
v↕    Multiply two items of the stack, to be evaluated
  ♦   Swap the top two items
   ▼  Decrement
    e Evaluate ↕ that many times

Factor + math.unicode, 18 bytes
[ dup <array> Π ]

Try it online!
        ! 5
dup     ! 5 5
<array> ! { 5 5 5 5 5 }
Π       ! 3125

C++ (clang), 45 bytes
int e(int x,int i=0){return++i<x?x*e(x,i):x;}

Try it online!

FunStack alpha, 14 bytes
Product Repeat

Try it at Replit!
Explanation
        Repeat  Given one argument N, create a list of N copies of N
Product         Return the product of that list

ReRegex, 55 bytes
#import math
(_+)p(_+)_/$1*($1p$2)/p_\b//#input
p#input

I/O as Unary _'s.
Explanation
Implements exponentiation by repeating the argument itself times. This is done by transforming, for instance ____p__ into ____*(____p_). Decrementing the right, and pulling the left out.
Finally, any instance of p_ has the p removed, as x^1==x.
Try it online!

C (gcc) with -lgmp, 82 bytes
Uses GMP because everyone needs to be able to do 100**100.
#import<gmp.h>
f(x,a,y)int*a;{mpz_init_set_ui(a,y=x);for(;--y;)mpz_mul_ui(a,a,x);}

Try it online!

Of course this challenge doesn't require it, but it costs +1 byte to make $0^0=1$: Try it online!

Arturo, 16 bytes
$=>[∏@.of:<=&]

Try it

Julia 1.0, 17 bytes
!x=prod(_->x,1:x)

Try it online!

Thunno 2, 3 bytes
⁻{×

Attempt This Online!
Wọp

Attempt This Online!
Explanation
⁻{×  # Implicit input
⁻    # Decrement the input
 {   # Repeat that many times:
  ×  #  Multiply TOS with input
     # Implicit output

Wọp  # Implicit input
W    # Wrap the input in a list
 ọ   # Repeat it input number of times
  p  # Product of this list
     # Implicit output

Aceto, 33 bytes
We have quite a bit of wasted space, so I'm sure we could get rid of a few more bytes.
=|
0*v
ds<

 MDL
 &_d
id!L
rDM@xp

The bottom half (except for the xp) reads the input, and puts it that many times on the stack, as an integer, i.e. '3' -> [3, 3, 3]. I really need a builtin for that..
The top half calculates the product by swapping the top two elements, checking if the top element is zero, otherwise multiplying the top two elements, and so on. xp prints.

PowerShell, 34 33 bytes
,$n,$p=$args,1;1..$n|%{$p*=$n};$p

Try it online!
Previous version
,$n,$ofs=$args,'*';''+@($n)*$n|iex

Using param($a)'1'+"*$a"*$a|iex works too, more in line with the other String->eval answers, nice to see other PowerShell golfers around,

Your noteworthy code snippet may be transformed to the next one param($a)"$a*"*$a+1|iex.

C (gcc), 34 bytes
i,k;f(x){for(i=k=x;--i;)x*=k;i=x;}

Try it online!

Fourier, 19 bytes
1~YI~X(Y*X~Yi^~i)Yo

Try it on FourIDE!
Multiplies Y by the input X number of times and then outputs Y.
FYI, the standard way to do this would be
I~XPXo

Where P is the power function

Python, 51 bytes
def f(x,i=0):i=i or x;return x*f(x,i-1)if i>1else x

A little bit more verbose than @xnor's clever way of eval, but uses recursion

Groovy, 24 bytes
{a->r=1;a.times{r*=a};r}

S.I.L.O.S, 56 bytes
readIO
x=i
readIO
a=i
b=1
lbla
a-1
b*x
if a a
printInt b

Try it online!
Loops through repeated multiplication.

Brain-Flak, 76 bytes
(({})){({}<(({}))>[()])}{}{{}({}<>)({<({}[()])><>({})<>}{}<><{}>)([][()])}{}

Try it online!
This is an extremely inefficient algorithm, so don't try inputs larger than 7.
Explanation:
#Duplicate the input
(({}))

#Make *n* copies of the input
{({}<(({}))>[()])}{}

#While the stack has more than one element on it,
{{}

  #Multiply the top two elements
  ({}<>)({<({}[()])><>({})<>}{}<><{}>)

  #Push stack-height minus one to keep the loop running
  ([][()])

#Endwhile
}

#Pop a zero off the main stack, implicitly display the number left on the stack
{}

PHP, 38 Bytes
for($p=1;$i++<$argn;)$p*=$argn;echo$p;

Try it online!

Drop that ,$i=0.

@Christoph as I write the answer there was a condition that no error should be throw

There's no version of PHP that doesn't ignore E_NOTICE by default. Only with E_NOTICE it is thrown ;) And you really should track your score using <s></s> like everyone else.

MATL, 5 bytes
lyX"p

Try it online!
Explanation
Example values with input 4.
l    % Push 1
     % STACK: 1
y    % Implicit input. Duplicate from below
     % STACK: 4, 1, 4
X"   % Replicate along two dimensions. Gives a row vector
     % STACK: [4, 4, 4, 4]
p    % Product of array. Implicitly display.
     % STACK: 256

QBIC, 12 bytes
:[a|q=q*a}?q

Explanation:
:   Get the integer
[a|     Start a FOR loop, for x iterations
q=q*a   Multiply q (starts out as 1) by our value, then store that in q
}       End loop
?q      Print q

Pari/GP, 16 bytes
n->prod(x=1,n,n)

Try it online!

Java 9 JShell, 44 bytes
x->IntStream.range(0,x).reduce(1,(a,b)->a*x)

Try it online!
Notes:

The imports are not included in the score since they are not required with the default JShell configuration (there are a number of packages imported by the default JShell startup script).
Since TIO doesn't have JShell, a Java (OpenJDK 9) program is provided that demonstrates the function, but has been changed to use longs so that 10 to the tenth doesn't overflow, at the expense of one extra byte.

Pyth, 9 bytes
u*GH*]QQ1

Try it online!

Pyth, 4
This took me a while to figure out in pyth, but I finally got there:
*F*]

Try it online.
Explanation
   ]Q     # create one-item list (of implicit input)
  *  Q    # repeat (implicit input) times
*F        # reduce list over multiplication

tcl, 52
proc P n {incr p;time {set p [expr $p*$n]} $n;set p}

demo

tcl, 50
proc P n {time {lappend L $n} $n;expr [join $L *]}

demo

PowerShell, 36 bytes
$a="$args";$b=1;1..$a|%{$b=$b*$a};$b

Try it online!

><>, 18 + 3 (-v flag) bytes
:l(?v:
=?v*>l1
n;>

Try it online!
-v flag to put our number on the stack allows for bigger numbers with little over head.
Explination
:l(?v:

:l(     | Copies the stack top, adds the length of the stack then compares.
   ?v:  | Checks if the compare was true,
        |  if not then copy the stack top and loop, else move down.

=?v*>l1

    >l1 | Move the direction right, add the length of the stack, add 1 to the stack.
=?v*    | Compare the length of the stack to 1,
        |  if the stack is 1 item move down, else multiply the top 2 stack items.

n;>

n;>     | Moves the directions right, then prints the top stack item as a number then ends the program.

Excel VBA, 34 Bytes
Anonymous VBE immediate window function that takes input from Range [A1] and outputs [A1^A1] to the VBE immediate window
n=1:For i=1To[A1]:n=n*[A1]:Next:?n

Interesting Version, 40 Bytes
Anonymous VBE immediate window function that takes input from Range [A1] and outputs [A1^A1] by method of worksheet manipulation to the VBE immediate window
[A1].Resize([A1],1)=[A1]:?[PRODUCT(A:A)]

Python 2.7, 37 bytes
Full Program:
s,x=1,input();exec('s*=x;')*x;print s

Try it online!

PHP, 44 bytes
<?=array_product(array_fill(1,$argn,$argn));

not the shortest solution; but it might trigger ideas for other languages.
Run as pipe with -R or try it online.

Pushy, 5 bytes
&tCP#

Try it online!
         \ Implicit: Input on stack                       [3]
&tC      \ Push (input - 1) extra copies of input         [3, 3, 3]
   P     \ Calculate product                              [3, 3, 3, 27]
    #    \ Output result                                  PRINT 27

Rockstar, 71 62 bytes
listen to N
X's0
P's1
while N-X
let X be+1
let P be*N-0

say P

Try it here (Code will need to be pasted in)

Python 2, 37 bytes
lambda x:reduce(lambda a,b:a*b,[x]*x)

For Python 3, add
from functools import reduce

Aussie++, 94 bytes
Not that there's an exponentiation builtin in the first place.
THE HARD YAKKA FOR f IS(x)<I RECKON a =1;I RECKON _ IS A WALKABOUT FROM[0TO x)a =a *x;BAIL a;>

Tested in commit 9522366. All whitespace included is necessary.
Just a straightforward golf of intPow from Math.aussie.

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