[Question]
      [
# Challenge
You are given an array \$a\$ of integers. With a ***move*** you can **increase or decrease** an element of the array **by 1**. Your task is to ***equalize*** the array, that is make all the elements of the array equal by performing some *moves*. But that's not enough! You also want to make **as few *moves* as possible**.
## Input
* A non-empty **array** \$a\$ of integers
* Optionally, the **length** of \$a\$.
## Output
* The **minimum number of *moves*** needed to *equalize* the array \$a\$.
# Rules
* **Standard rules** for [valid submissions](https://codegolf.meta.stackexchange.com/q/2419/82619), [I/O](https://codegolf.meta.stackexchange.com/q/2447/82619), [loopholes](https://codegolf.meta.stackexchange.com/q/1061/82619) apply.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so **shortest solution** (in bytes) wins. As usual, don't let ridiculously short solutions in golfy languages discourage you from posting a longer answer in your language of choice.
* This is not a rule, but your answer will be better received if it includes a link to test the solution and an explanation of how it works.
# Examples
```
Input                       --> Output
[10]                        --> 0
[-1, 0, 1]                  --> 2
[4, 7]                      --> 3
[6, 2, 3, 8]                --> 9
[5, 8, 12, 3, 2, 8, 4, 5]   --> 19
[1,10,100]                  --> 99
```

[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 19 bytes
```
Tr@Abs[#-Median@#]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2Yb8z@kyMExqThaWdc3NSUzMc9BOVbtf0BRZl6JQ5pDtaFBLReco2uoo2Cgo2CIJGSio2COxDXTUTDSUTDWUbBAEjQFcoG6IBJGYA5Qm2ntfwA "Wolfram Language (Mathematica) – Try It Online")
For 1D integer array, `Tr` works the same way as `Total`.
## How?
Simple application of triangle inequality.
...
I originally intended to write the proof here, but then decide to look up <https://math.stackexchange.com> instead and found [The Median Minimizes the Sum of Absolute Deviations (The \$ {L}\_{1} \$ Norm)](https://math.stackexchange.com/questions/113270/the-median-minimizes-the-sum-of-absolute-deviations-the-l-1-norm).
By knowing the name of the operator, this is an alternative 19-byte solution:
```
Norm[#-Median@#,1]&
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~50~~ 48 bytes
Saved 2 bytes thanks to Arnauld
```
a=>a.sort((x,y)=>x-y,r=0).map(n=>r+=a.pop()-n)|r
```
[Try it online!](https://tio.run/##VczPDoIwDAbwu0@xcOpiRzYQ/8SUFzEeFh0JJsLs0MDT4wJcduvX39e@7M@GB7d@UF3/dHNDs6UamDTaPPQ8AIw4SapHNcn8bT10VPOebO57D1J1ElnONgTHA7H7fFt2kK05k9fdOkEDN6PvUhCR0MlaGRQahYm4aJHoAcVpOysTOKIoUJQozhtfEq4ixKdrpVhCfFVtXRPL8x8 "JavaScript (Node.js) – Try It Online")
Sort the array ascending then sum:
```
  a[last]   -a[0] // moves to equalise this pair
+ a[last-1] -a[1] // + moves to equalise this pair
+ ...etc
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~29~~ 28 bytes
*-1 byte thanks to nwellnhof*
```
{sum (.sort[*/2]X-$_)>>.abs}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/urg0V0FDrzi/qCRaS98oNkJXJV7Tzk4vMam49r81V3FipUKaRrShQawmnKNrqKNgoKNgiCRkoqNgjsQ101Ew0lEw1lGwQBI0BXKBuiASRmAOUJtprOZ/AA "Perl 6 – Try It Online")
### Explanation
```
{                          }  # Anonymous code block
      .sort[*/2]              # Get the median of the input array
                X-$_          # Subtract all elements from the median
     (              )>>.abs   # Get the absolute of each value
 sum                          # Sum the values
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 4 bytes
```
ÅmαO
```
[Try it online!](https://tio.run/##yy9OTMpM/W/q5vL/cGvuuY3@/3X@RxsaxHJF6xrqKBjoKBgCmSY6CuZAykxHwUhHwVhHwQLIMQVSQFmIgBGYA1RmGgsA "05AB1E – Try It Online")
**Explanation**
```
Åm     # push median of input
  α    # absolute difference with each in input
   O   # sum
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-g`](https://codegolf.meta.stackexchange.com/a/14339/), ~~7~~ 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
£xaXÃÍ
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LWc&code=o3hhWMPN&input=WzUsIDgsIDEyLCAzLCAyLCA4LCA0LCA1XQ)
```
£xaXÃÍ     :Implicit input of array U
£          :Map each X
 x         :  Reduce by U by addition after applying
  aX       :    Absolute difference with X
    Ã      :End map
     Í     :Sort
           :Implicit output of first element
```
[Answer]
# JavaScript (ES6), ~~60~~ ~~56~~ 55 bytes
*Saved 1 byte thanks to @Shaggy*
```
a=>a.map(r=k=>r=a.map(n=>m+=n>k?n-k:k-n,m=0)|m>r?r:m)|r
```
[Try it online!](https://tio.run/##fc5BDoIwEAXQvaeYJY0ttCAqJC0HMV00CEZLW1KMK@5eiSxMGnF2P/kvfx7qpabW38cnse7ahZ4HxYVKjRoTzzUXnq/BcmH23ArdWKJrTSw2nKLZCN/42qDZh9bZyQ1dOrhb0icXRiX8OoQgy4AQAXQXEcIwUAxMbpI8JgcMJ/l3pYjJEUOOocBwlhukikm5lJe/VpZ/wjJcyi9hVXgD "JavaScript (Node.js) – Try It Online")
### How?
Unless there's some trick that I'm missing, computing the median in JS turns out to be longer. Probably around **65 bytes** because of the required callback for `sort()` to circumvent the default lexicographical sort and the rather lengthy `Math.abs()`:
```
a=>a.sort((a,b)=>b-a).map(n=>s+=Math.abs(n-a[a.length>>1]),s=0)|s
```
Instead of that, we try all values in the original array as the *equalizing* value.
[Answer]
# [Haskell](https://www.haskell.org/), 34 bytes
```
f l=minimum[sum$abs.(m-)<$>l|m<-l]
```
[Try it online!](https://tio.run/##JU3LCsIwELz7FXPIQWEjbbXqIfVHQg4RFIO7oZjm1n@Piz3Nk5l3LJ8nc2sv8CQpJ6niSxUTH@W4F3tw5s6rOMuhpTzXpWCC930XyNue0BF6pWfCVeFCGAgnwk3FqKDpZgx/obUxhJ3ElHVm/qa8wMDr98rObvuh/QA "Haskell – Try It Online")
Finds the total distance of all elements to the median, testing each element in the list as the potential median and taking the smallest result.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
ạÆṁS
```
[Try it online!](https://tio.run/##y0rNyan8///hroWH2x7ubAz@f7j9UdMa9///o6MNDWJ1uKJ1DXUUDHQUDEFsEx0FcxBtpqNgpKNgrKNgAeKZAmmgAoiIEZgDVGgaGwsA "Jelly – Try It Online")
### How it works
```
ạÆṁS – Full program. Takes an array A of integers as input from argument 1.
 Æṁ  – Median. For odd-length A, middle element of S. For even-length A, the
       arithmetic mean of the two middle elements of S. Where S = A sorted.
ạ    – Absolute difference of each element with the median.
   S – Sum.
```
[Answer]
# [Python 2](https://docs.python.org/2/), 46 bytes
```
lambda l,n:sum(l[-~n/2:l.sort()])-sum(l[:n/2])
```
[Try it online!](https://tio.run/##TcxBDoIwFATQvaf4yzaZKi2gpMST4F9gDNGkFAJ14Yar10YS0@W8ycz8Cc/Jmzhcb9H14/3Rk4O363sUrlObPxnrjuu0BCFZqp1tUpZxXl4@0CA6XTC0bA9/UBpUgDSjzLkCXRgmpzPIgEpQw6jyok6UHvbS/EKa14xGxi8 "Python 2 – Try It Online")
Takes the list length `n` as an argument. Computes the top-half sum minus the bottom-half sum by slicing the sorted list into the first `n/2` and last `n/2` elements.
The expression `l[-~n/2:l.sort()]` is equivalent to computing `l.sort()`, which modifies the list in place, then doing `l[-~n/2:None]`, where the list slicing ignores upper bound of `None` that `l.sort()` produced. It might seem like the list was sorted too late to be sliced right, but Python seems to evaluate the slice arguments before "locking in" the list to be sliced.
---
**[Python 2](https://docs.python.org/2/), 47 bytes**
```
lambda l,n:sum(abs(x-sorted(l)[n/2])for x in l)
```
[Try it online!](https://tio.run/##TczRCsIgGAXg@57iv1Q4o@m2GkVPsrzYWNLA6VCD9fQmBeHl@Q7nbO/4dFYmfbsnM67TPJKBvYTXysYpsL0KzsfHzAwf7FEqrp2nnRZLhqfNLzaSZoOoFQS/Hv5QCVANEgpNyS3orCBLOoEkqAH1Cm1ZdJnyw6@U35DnnULP0wc "Python 2 – Try It Online")
The boring method of summing the distance of each value from the median. Takes the length `n` as an argument.
---
**[Python](https://docs.python.org/2/), 51 bytes**
```
f=lambda l:l>l[l.sort():1]and l[-1]-l[0]+f(l[1:-1])
```
[Try it online!](https://tio.run/##VY1BCsIwEEX3nmKWCU4kE62ViF5kyCJSgsKYlpqNp49BQcjyvc/jL@9yn7OrNV0kPm9TBPFyFZbda16L0p5CzBMIGwpG2IZtUsLkG@q6rI9cICkmG/R580dDCBaBOnlAGDtxRHAIe4RTp4cmWvub3BdaOrS7Dw "Python 2 – Try It Online")
Sorts the list in place, then repeatedly adds the last (highest remaining) entry minus the first (lowest remaining) entry, and recurses on the list without these elements until only 0 or 1 remain. Usings `pop`'s gets the same length: `l.pop()-l.pop(0)+f(l)`.
The `l.sort()` is stuck in a place where the `None` it returns has no effect. The slice `l[None:1]` is the same as `l[:1]` because `None`s in slices are ignored.
---
**[Python](https://docs.python.org/2/), 54 bytes**
```
lambda l:sum(l.pop()-l.pop(0)for _ in l[1:l.sort():2])
```
[Try it online!](https://tio.run/##VY3RCsIgGIXve4pzqfBvqLUKY0@yRixCGjgVZxc9vZMGgVeH7zscTvimt3cqm/6e7bQ8XxOsXj8Ls23wgfFmT8GNj3hgdrCD1LZdfUyMazXyHOLsEgwbpBj57fDHRhIEQVbyRLhU4kxQhCPhWumuiLLdK/WDMu3K3QY "Python 2 – Try It Online")
A cute list comprehension that ignores the argument iterated over and modifies the list in place by repeatedly popping the first and last elements. We ensure that the list comprehension is done `len(l)//2` times by iterating over every other element of `l` skipping the first, done with `l[1::2]`. The `l.sort()` producing `None` can be stuck in the unused slice end argument.
[Answer]
# APL(Dyalog), 12 bytes
```
{⌊/+/|⍵∘.-⍵}
```
Brute forces by testing each number as the equalizer. Not sure if tacit is shorter, but I can't figure it out.
[TIO](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/g8E1Y96uvS19Wse9W591DFDTxdI1xoqGCkYc2GTMQPJKFhglTNVsFAwBEkbARkmCqYA)
[Answer]
# TI-Basic, ~~18~~ 6 bytes
```
sum(abs(Ans-median(Ans
```
-12 bytes from [Misha Lavrov](https://codegolf.stackexchange.com/questions/173038/equalize-the-array/173052?noredirect=1#comment417510_173052) (I haven't used TI-Basic in a while and I forgot it's lists can do that)
TI-Basic is a [tokenized language](http://tibasicdev.wikidot.com/one-byte-tokens). All tokens used in this answer are one byte.
Takes input as `{1,2,3,4}:prgmNAME`
Basically the same idea as most other answers: subtract through by the median, then take the sum.
Explanation:
```
sum(abs(Ans-median(Ans
sum(                    # 1 byte, Add up:
    abs(                # 1 byte, the absolute values of
        Ans-median(Ans  # 4 bytes, the differences between each element and the list's median
```
[Answer]
# [Röda](https://github.com/fergusq/roda), 33 bytes
```
{|a|a|abs _-[sort(a)][#a//2]|sum}
```
[Try it online!](https://tio.run/##PYzNCoMwEITveYrFXhRW/KltpWDvfQYrktZYhJqEbDypz26NgjOXYfhmjGr40vNOwshgVQv3Al7LOHHnN0EdlqSM9XlQlSceRWk10dDPywYrA1aQrT@cBDRqe3DqpB6seypJ/zrrHxACCV146AUwgeaGxFNa8RXGr4PqmHNJbtz6209w9Np00u4lggfhAzx08E40Sgo2L0nMwgRjTFiGN3bFFM@YswvmmLiYriHDyx8 "Röda – Try It Online")
Explanation:
```
{|a| /* Anonymous function with parameter a */
  a|         /* Push items in a to the stream */
             /* For each _ in the stream: */
  abs        /*   Abstract value of */\
  _-         /*   the value from stream minus */\
  [sort(a)][ /*     the value in the sorted version of a at index */
    #a//2    /*       length of a / 2 (the median) */
  ]|
  sum        /* Sum of all values in the stream */
}
```
[Answer]
# C (gcc), ~~100~~ 93 bytes
```
e(q,u,a,l,i,z)int*q;{i=1<<31-1;for(a=u;a--;i=z<i?z:i)for(l=z=0;l<u;)z+=abs(q[l++]-q[a]);q=i;}
```
Brute-force solution, tries to equalize with each element. Try it online [here](https://tio.run/##VZBdS8MwFIav7a84FITEneLSD3VLgwgqiII/YO4idtkM1G79mGhHf3tNm03MXc9znvdtkizYZFnfK1LiHiXmqLGlumguSn7QgqVpxALG19uKSLHnMgi4Fm2qb9u5pgPNRSumPE/3nLYTId9rUi7yyWQZlAu5pLwUmne96QNZVfKHLZYg4MCmHVoQWhAwhCkCO@HI4hjh@oRii64QQoQI4ea0SOwiMcg02GU4DiaedNzzvrZ6BY2qGzJczKYQhkPlqtg0H/Zbfe9U1qgVhYN3tqsMWhP/vH4rfARFjiEboCDEnw@34L8@@zAH//Hu6eXh3qfc6zxv6PyUuiDD78fS8Qj2HRBq3art@jjSy@NoQtQ8hWn4Z4euHbp26MqRK0euHLly7MqxK89cOXHlxJXZbLx2/ws).
Thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat) for golfing 7 bytes.
Ungolfed:
```
e(q, u, a, l, i, z) int *q; { // function taking an array of int and its length; returns an int (extra parameters are variables and don't have to be passed when calling e())
    i = 1 << 31 - 1; // construt the maximum value of a signed 4-byte integer
    for(a = u; a--; i = z < i ? z : i) // loop through the array, testing each element as the equalizer; if the number of moves is smaller than the current minimum, set it as the new minimum
        for(l = z = 0; l < u; ) // loop through the array ...
            z += abs(q[l++] - q[a]); // ... and sum the number of moves it takes to equalize each element
    q = i; // return the minimum number of moves
}
```
[Answer]
# [R](https://www.r-project.org/), 29 bytes
```
sum(abs(median(a<-scan())-a))
```
[Try it online!](https://tio.run/##K/r/v7g0VyMxqVgjNzUlMzFPI9FGtzgZSGtq6iZqav43VbBQMDRSMFYwAjJMFEz/AwA "R – Try It Online")
[Answer]
# PHP, 69 bytes
```
function($a,$c){for(sort($a);$c-->$d;)$s+=$a[$c]-$a[+$d++];return$s;}
```
anonymous function. [Try it online](http://sandbox.onlinephpfunctions.com/code/5c2461fcd9f794c6a360dd11a5519eb60b5d7050).
[Answer]
# Java 8, 116 bytes
With `java.util.List<Integer>` as parameter, which has a short sort-builtin, but is longer to retrieve a value at a given index:
```
L->{L.sort(null);int r=0,l=L.size(),k=l;for(;k-->0;)r+=Math.abs(L.get(k)-(L.get(l/2+~l%2)+L.get(l/2)>>1));return r;}
```
[Try it online.](https://tio.run/##dVBda8IwFH3frwjCIKFp1na6ybIW9jiovvg49hBrdLExleTW4cT99S7tihTHXi73fHA592zFQYTbVdkUWjiHZkKZ0w1CyoC0a1FING9hR6ACb72b1aA0y5WD51fv2kiboZxw7zrf@OFAgCrQHBmUoiYPs1POXGUBm1prwts7No2oTj2tviQmtEw1X1cW8zIMs4gTG6QzAR9MLB3O2UYCLknYb/ouCb71bUKCCyZZFhPCrYTaGmT5ueFtjn291D5HH@dQqRXa@efwAqwym7d3JMjvZyAd4DjqPuhRGNOIxkNmTB@H8IEm9J5Oh9SETmncsolfxnQy1GIa@3tRdMXR8Z/aupyd3nfLGLsk/bd937SRnwP9xVpx7EwZvmIdE65VsCB9nMXRgdyxqga2992ANjgPRk9oFBhW4Jz0Ic/NDw)
With `int[]` (integer-array) as parameter, which has a long sort-builtin, but is shorter to retrieve a value at a given index:
```
a->{java.util.Arrays.sort(a);int r=0,l=a.length,k=l;for(;k-->0;)r+=Math.abs(a[k]-(a[l/2+~l%2]+a[l/2]>>1));return r;}
```
[Try it online.](https://tio.run/##ZVDBisIwFLz7FUFYSGmabbp1Vza0sB@gF4/SQ6xV28ZUkldBxP317muVpejlMTOPvMxMpc4qqLZ1l2vlHFmo0lwnhJQGCrtTeUGWPR0EklOc64woT6J2m@BwoKDMyZIYkpBOBem1woO8hVLzH2vVxXHXWKD4pL9gk5DpRHFdmD0cWJ1ouWsslXUQpKH0rJ8sFBy42jiq1nUW4NTvkf@r36LMH3CWpsLzpC2gtYZYeetk7@PUbjT6eNg5N@WWHDEKXYEtzX7wfM8BhQMqwiHBgwWChUyMlZh9jekni9gHm4@lGZsz0asRgpjNxjvBBN4LwyeNxS@1DT6HPZbDOf93ubo4KI68aYGfMABoQ196heYeDrv1p99k6hueI358cuv@AA)
**Code explanation (of the array answer):**
```
a->{                               // Method with integer-array as parameter and integer return-type
  java.util.Arrays.sort(a);        //  Sort the input-array
  int r=0,                         //  Result-sum, starting at 0
      l=a.length,                  //  The length of the input-array
  k=l;for(;k-->0;)                 //  Loop `k` in the range (length, 0]:
    r+=                            //   Increase the result-sum by:
       Math.abs(a[k]-              //    The absolute difference of the `k`'th value of the array,
        (a[l/2+~l%2]+a[l/2]>>1));  //    and the median of the array
  return r;}                       //  And then return this result-sum
```
**General explanation:**
1. Sorts the input-list
2. Calculate the \$median\$
3. Calculate the absolute difference of each value with this \$median\$
4. Sum those
The median of the array \$a\$ is calculated by:
1) Taking the sorted values at the (0-based) indices \$i\$ and \$j\$, which are calculated like this (using the `l/2+~l%2` instead of `l/2-(l+1)%2` trick to save bytes):
\$j=\left\lfloor\frac{1/2}l\right\rfloor\$
\$i=\left\lfloor\frac{1/2}l\right\rfloor - ((l+1) \bmod 2)\$
Note that \$i=j\$ for odd-sized arrays.
2) And then adding these together, and integer-dividing them by 2 (using the `i+j>>1` instead of `(i+j)/2` trick to save bytes):
\$median = \left\lfloor\frac{a[i]+a[j]}{2}\right\rfloor\$
After which we can use this \$median\$ to calculate the absolute difference with the current item, which we can use to calculate the total sum:
\$\sum\limits\_{k=0}^{l} = \left\lvert a[k] - median\right\rvert\$
with \$l\$ being the length of the array \$a\$, and \$k\$ being the (0-based) index.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 4 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
δαOß
```
I know there is already [an existing 4-bytes 05AB1E answer](https://codegolf.stackexchange.com/a/173044/52210) using the median builtin `Åm`, but I decided to post this alternative 4-byter without this builtin.
[Try it online](https://tio.run/##yy9OTMpM/f//3JZzG/0Pz///P9pQx9AAiAxiAQ) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXL/3Nbzm30Pzz/v87/6GhDg1gdhWhdQx0DHUMQy0THHESZ6RjpGOtYgJimOhY6hiCeEZBhomMKEjPUMQSqNzCIjQUA).
**Explanation:**
```
δ     # Apply the following command double-vectorized on the given two arguments,
      # which will use the input-list twice implicitly, since the stack is empty:
 α    #  Absolute difference
      #  i.e. [1,10,100] → [[0,9,99],[9,0,90],[99,90,0]]
  O   # Sum each of these inner lists
      #  → [108,99,189]
   ß  # Pop and push the minimum of this list
      #  → 99
      # (after which this is output implicitly as result)
```
[Answer]
# [Attache](https://github.com/ConorOBrien-Foxx/Attache), 18 bytes
```
Sum##Abs@`-#Median
```
[Try it online!](https://tio.run/##SywpSUzOSP2fpmBl@z@4NFdZ2TGp2CFBV9k3NSUzMe@/X2pqSnG0SkFBcnosV0BRZl5JSGpxiXNicWpxdJqOQjRXtKFBrA5XtK6hjoKBjoIhiG2io2AOos10FIx0FIx1FCxAPFMgDVQAETECc4AKTWO5YmP/AwA "Attache – Try It Online")
## Explanation
```
Sum##Abs@`-#Median
            Median    take the median of the input list
     Abs@`-#          absolute difference with the original list
Sum##                 sum of all elements
```
[Answer]
# [J](http://jsoftware.com/), 15 bytes
```
[:<./1#.|@-/~"{
```
Essentially the same as Shaggy's Japt solution.
[Try it online!](https://tio.run/##y/qfVmyrp2CgYKVg8D/aykZP31BZr8ZBV79Oqfq/JpeSnoJ6mq2euoKOQq2VQloxF1dqcka@QpqCiYI5jGmoYKRgDOOYgTgKFjCuqYKFgiFIxAjIMFEw/Q8A "J – Try It Online")
## How it works?
`|@-/~"{` - creates a table `/~` of absolute differences `|@-` of each number to all others `"{`
```
   |@-/~"{ 6 2 3 8
0 4 3 2
4 0 1 6
3 1 0 5
2 6 5 0
```
`1#.` sums each row
```
   1#.|@-/~"{ 6 2 3 8
9 11 9 13
```
`[:<./` finds the smallest item (reduce by minimum)
```
   ([:<./1#.|@-/~"{) 6 2 3 8
9
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~16~~ 11 bytes
```
Ｉ⌊ＥθΣＥθ↔⁻ιλ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5sbhEwzczLzO3NFfDN7FAo1BHIRjBdEwqzs8pLUkFKSkt1sjUUcjRhALr//@jo011FCx0FAyNdBSMdRSMwBwTHQXT2Nj/umU5AA "Charcoal – Try It Online") Link is to verbose version of code. Edit: Saved 5 bytes thanks to @Arnauld. Explanation:
```
  Ｅθ        Map over input array
     Ｅθ     Map over input array
         ι  Outer value
          λ Inner value
        ⁻   Difference
       ↔    Absolute value
    Σ       Sum
 ⌊          Minimum
Ｉ           Cast to string
            Implicitly print
```
[Answer]
## Visual C#, 138 bytes
```
int s=0;foreach(string i in a)s+=int.Parse(i);int x=s/a.Length;int o=0;foreach(string i in a)o+=Math.Abs(int.Parse(i)-x);Console.Write(o);
```
ungolfed:
```
int s = 0;                    // Takes a string array of arguments a as input
foreach (string i in a)
     s += int.Parse(i);       // s as sum of the array elements
int x = s / a.Length;         // calculating the target value of all elements
int o = 0;                    // o as minimum number of moves
foreach (string i in a)
     o += Math.Abs(int.Parse(i) - x);    // summing up the moves to the target value
Console.Write(o);
```
[Try it online!](https://tio.run/##dYyxCsIwFEV3vyJjQ2nVakEIHcTVQsHBQRyeMbYP2gTyolRKv/1ZxcHF7XLPuVdToknzndDW4vCkYDo10y0Qicq72kM3UICAWjwcXkUJaCMKfrJPZwFyYLRBULFQN@cN6OYLBQq0E6e4mIS0Ak8mQqnedl/QHNK9sXVoPoX7O3dxUUJo0u2Fot@fpJdq5yy51qRHj8FETioeR@acN7zMeMXZFNacvwA)
[Answer]
# PHP, 78 bytes
Sorts the array, then loop through a copy, popping elements off the original and summing the absolute difference, that needs to be halved for the return.
```
function m($n){sort($n);foreach($n as$i)$r+=abs(array_pop($n)-$i);return$r/2;}
var_dump(
    m([10]),
    m([-1, 0, 1]),
    m([4, 7]),
    m([6, 2, 3, 8]),
    m([5, 8, 12, 3, 2, 8, 4, 5]),
    m([1,10,100])
);
```
Output:
```
int(0)
int(2)
int(3)
int(9)
int(19)
int(99)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 38 bytes
```
->a{a.map{|x|a.sum{|y|(y-x).abs}}.min}
```
[Try it online!](https://tio.run/##LctBDsIgFATQNZ7iJ2w0@RCgttqFXqRh8bto4gLT2DQpAc6OCC7nzcxnn31eHlk8KZB0tIZ4RJLb7kL08ezFcZE0bylJ93qnvMIyTVpZC4wxDupUQWgEhaCtrWqaXhFuf@maDAgGoUO4/5zD2LgvUN6tMjWUb182HPSYvw "Ruby – Try It Online")
[Answer]
# [C++ (gcc)](https://gcc.gnu.org/), 94 bytes
```
#import<regex>
int f(int c,int*a){int s=0,d=0;for(std::sort(a,a+c);c-->d;)s+=a[c]-a[d++];c=s;}
```
Port of the [PHP solution](https://codegolf.stackexchange.com/a/173068/89298). Kudos to [Titus](https://codegolf.stackexchange.com/users/55735/titus)!
Input size of the array and a non-`const` mutable array. Output the minimum number of moves required to equalize the array.
*-4 bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)!*
[Try it online!](https://tio.run/##VVDRasMgFH33Ky4MVl1MSbp1GzHxR7o@iNoiLDFEI2Ml354ZA13jw/Wec8/x4JV9n1@lnOcn0/Z28PWgr/qHI9N5uOClShrriyC3BbimoKop2MUO2HlVVS56sKAik4TJPOeKEZc14iTPuTipLDsz2Tg2xec7@T0qDbWxzg9atBz9c0FLbweOUmwrTIeDNYqgG4J4UtAqqR/7KOYcTNKsytRBWcBEH3BeUigolFv2jcLHlnmncKDwSuFzyx8jE@3r7JBANB@3ophRLiHFPXxiKN3LrsToLTwHqMCQuyn9RdrRQ13HZYe9M78aEwphr4QXmJBlsPvqdgxN8x8 "C++ (gcc) – Try It Online")
[Answer]
# [V (vim)](https://github.com/DJMcMayhem/V), 84 bytes
```
:sort
Go<c-r>=(line('$')-1)/2
<esc>dd@"kk0vg_"ayGqq0C<c-r>=abs(<c-r>"-<c-r>a)
<esc>k@qq@q:%s/\n/+
$x0C<c-r>=<c-r>"
<esc>
```
[Try it online!](https://tio.run/##K/v/36o4v6iEyz3fJlm3yM5WIyczL1VDXUVdU9dQU9@Iyya1ONkuJcVBKTvboCw9Ximx0r2w0MAZojgxqVgDzFLSBVOJmhD12Q6FhQ6FVqrF@jF5@tpcKhUwDRDFEEX//5tyWXAZGnEZcxkBGSZcpv91ywA "V (vim) – Try It Online")
`<c-r>` is very helpful in finding the median and the whole calculation in general.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 52 bytes
```
($a=$args|sort)|%{$_-$a[--$i]}|%{$s-=$_*($_-lt0)}
$s
```
[Try it online!](https://tio.run/##PY/tCsIgFIb/exWHOAsNhdl3waD7iBij7AMGLV1UbF77Op1aIsj7PL7Kqa4P58PZlWWHR8ig6SQWGRb@FNpw9bVqkwZzg8XWGLzs4icGk2E@koTLOlVRYOiiEBspgJaWqf6cNlW/POZsrAYytqcTplMNi56smMw1UIHssueWxYwI1b9uzIHKs3@ZL1ltU9r0tYIWEmjYontWbl@7gwYazBcvmhPzr/Iu3MuawJDG37BlMUD5c8bd/g@odd8YiNi9AQ "PowerShell – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-ap`, 39 bytes
```
map$\+=abs$_-(sort{$a-$b}@F)[@F/2],@F}{
```
[Try it online!](https://tio.run/##K0gtyjH9/z83sUAlRts2MalYJV5Xozi/qKRaJVFXJanWwU0z2sFN3yhWx8Gttvr/f1MdBQsdBUMjHQVjHQUjMMdER8H0X35BSWZ@XvF/3cQCAA "Perl 5 – Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 107 bytes
```
$f={param($i)$m=($i|sort)[[int](($i.count-1)/2)];($j+=$i.foreach({([math]::abs($m-$_))})|measure -sum).Sum}
```
[Try it online!](https://tio.run/##DchNCoMwEEDhq3QxixlKLHZpySm6DKFMJRKLYyQ/dKGePWb1@N4W/i4m75alVpj0vnFkQZgJRLccKcRMxsxrttjcjaGsWfX0eJJ9Ifzuus0pRMejxx2NcPZ2GPibEETBh@ikQxynEt1NpSLUvYuctV4 "PowerShell – Try It Online")
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 115 bytes
```
function f($i){$m=($i|sort)[[int](($i.Count-1)/2)];return($j+=$i.ForEach({([math]::Abs($m-$_))})|measure -Sum).Sum}
```
[Try it online!](https://tio.run/##DYqxCsIwFEV3vyJDhjykio4tHUR0EwTHUiTWtI00ibz3okjbb69Z7uFw7jt8DVJvhmGJZH0nbj9i44pVM2giccXQoXYjsWbbiE@wT3HR1itiTO@qFhrGpY2@YRu8aJW0MEpXJk4UkKGqrOdaJd8cQ/Sc7WC7h7pAwxG9kq91mdI54Ek3vRpV5TT3dZ4fHqSky@QdYIbJGU0Rjchu0cEmzbzM8/IH "PowerShell – Try It Online")
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 52 bytes
```
f=a=>(v=a.sort((x,y)=>x-y).pop()-a.shift())?v+f(a):0
```
[Try it online!](https://tio.run/##bYzBCsIwEAXvfkWOu7gJSbUqQuqHiIdQG20pTWhCab8@Br1Jjm9meINZTGjn3kc@uWeXktVGN7BoI4KbI8BKG@pm5RsK7zwgz@Ld2wiIt2VvweBVptZNwY2dGN0LLNyVfCDu/iBXxCQxVVBHYucCPhGriB2IXQqyzji//YLqO/JNncv0AQ "JavaScript (Node.js) – Try It Online")
[Answer]
**Kotlin Android, 200 bytes**
```
fun m(a:IntArray){var d=0;var s=0;var p=a.max()!!.times(a.size);var x =0;for(i in a.indices){x=a[i];d=0;s=0;while(d<a.size){if(x-a[d]<0)s=((x-a[d])*-1)+s;else s=((x-a[d]))+s;d++};if(p>s)p=s};print(p)}
```
[Try Online](https://rextester.com/live/SGDG37478)
]


[Question]
      []


[Question]
      [
**Challenge:**
The concept is simple enough: write a full program to output its own code golf score!
Output should only be the byte count of your program and a trailing  `bytes`.
**BUT WAIT**..... there is one restriction:
* Your source code can not include any of the digits from your byte count
* So if your score is `186 bytes`, your program can not contain the characters `1` , `6` , or `8`
**Example Output:**
```
315 bytes
27 Bytes
49 BYTES
```
**Additional Rules:**
* Unnecessary characters, spaces, and newlines are forbidden in the source code, however trailing spaces and newlines are perfectly acceptable in output
* There should be a single space between the number and `bytes` in the output
* Letters are case insensitive
* No self inspection or reading the source code
* [standard loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are disallowed
* this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so
**Shortest code in bytes wins!**

[Answer]
## Go, 46 Bytes
```
package main;func main(){print(38+8," bytes")}
```
[Answer]
# C (gcc), 32 bytes
```
main(){printf("%d bytes",8*4);}
```
Nothing crazy here.
[Answer]
# Commodore 64 - 74 tokenized and BASIC bytes
Assuming by score in bytes, you mean tokens and bytes used by the BASIC interpreter, this works:
```
0 def fn b(x) = 38911-(fre(x)-2^16*(fre(x)<x)): print fnb(.);"bytes
```
There is a bug in the FRE() function on the Commodore 64 as it assumes maximum size of BASIC is 32K, or 32768 bytes.
### Commodore VIC-20 (unexpanded) - 29 tonkenized and BASIC bytes
```
0?(60*60-17)-fre(.)"bytes
```
[Answer]
# [Zsh](https://www.zsh.org/), 16 bytes
```
<<<$[##␐]\ bytes
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724qjhjwYKlpSVpuhYbbGxsVKKVlQViYxSSKktSiyHCUFmYKgA)
`␐` should be a literal `0x10` byte, but that doesn't show up in SE markdown.
---
## [Zsh](https://www.zsh.org/) `-BCDEFGHIJ`, 13 bytes
```
<<<$#-\ bytes
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724qjhjXbSSrpOzi6ubu4enl1LsgqWlJWm6FmttbGxUlHVjFJIqS1KLIWJQqQVQGgA)
Cheating.
[Answer]
# [Thunno](https://github.com/Thunno/Thunno), 14 bytes
```
7 2*J" bytes"+
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72sJKM0Ly9_wYKlpSVpuhbrzBWMtLyUFJIqS1KLlbQhglA5mBoA)
#### Explanation
```
7 2*             # Push 7 * 2 (14)
    J            # Convert to string
     " bytes"    # Push the string " bytes"
             +   # Concatenate
                 # Implicit output
```
[Answer]
# [Malbolge](https://github.com/TryItOnline/malbolge), 106 bytes
```
D'`_ML"n<YkFEVwwe@PsON;:ml[kG4ECe#z@x,_^)\[Zvotm3qSi/gfed*hgfH%]baZ_^W{UZSRWVUNrR4PINGLEiIBG@dDCB$@?>=<5YF
```
[Try it online!](https://tio.run/##y03MScrPSU/9/99FPSHe10cpzyYy2801rLw81SGg2N/P2io3Jzrb3cTVOVW5yqFCJz5OMyY6qiy/JNe4MDhTPz0tNUUrIz3NQzU2KTEqPi68OjQqOCg8LNSvKMgkwNPP3cc109PJ3SHFxdlJxcHeztbGNNLt/38A "Malbolge – Try It Online")
Created with [zb3 malbolge tools](http://zb3.me/malbolge-tools/#generator)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 15 bytes
```
30 2/ò" bytes"J
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f2EDBSP/wJiWFpMqS1GIlr///AQ "05AB1E – Try It Online")
[Answer]
# [TypeScript](https://www.typescriptlang.org)'s type system, 24 bytes
```
type F=`${0o30} bytes`;;
```
[Try it at the TS playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAYgvAAwCQG8AMB7AzGgvlAIxGAgGcEBuCgKAHpapGA9AfmqA)
TIL TypeScript has octal literal types. Two dead bytes because `0o26` has a `2` in it.
# [TypeScript](https://www.typescriptlang.org)'s type system, ~~65~~ 55 bytes
```
type Z=[1,1,1,1,1]["length"]
type F=`${Z}${Z} bytes`;;;
```
[Try it at the TS playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAWgvAbQIwBpXrQXQQIgDYQB2A5sABY6YBQokUAYnAAYAkA3jAL7tdQBGIYBADOTANwSqAeilQ5APQD8VIA)
3 dead bytes there, in order to get both digits the same.
]


[Question]
      [
## Challenge
We take three positive integers `a`, `b`, and `c` as input. Using these integers, first create a sequence in the range `[0, c]` (inclusive on both ends), in steps of `b`. For example, for `a=4, b=2, c=100`, the sequence would be `[0,2,4,...,96,98,100]`.
For every number in this sequence which is divisible by `a`, replace it with the next letter in the lowercase alphabet, starting with the letter 'a' and wrapping back around to 'a' after you reach 'z'.
## Example:
Input: `a=4, b=2, c=100`
Output: `a2b6c10d14e18f22g26h30i34j38k42l46m50n54o58p62q66r70s74t78u82v86w90x94y98z`
## Challenge rules:
* You can assume that `a`, `b`, and `c` are positive integers only, where `b ≤ a ≤ c`.
* You can assume `a` is a multiple of `b`.
* You can assume `c` is divisible by `b`.
* The preferred output is a single concatenated string as above, but a list/array is acceptable as well.
## Test cases:
```
Input: a=4, b=2, c=100
Output:
a2b6c10d14e18f22g26h30i34j38k42l46m50n54o58p62q66r70s74t78u82v86w90x94y98z
Input: a=9, b=3, c=174
Output:
a36b1215c2124d3033e3942f4851g5760h6669i7578j8487k9396l102105m111114n120123o129132p138141q147150r156159s165168t174
Input: a=10, b=2, c=50
Output:
a2468b12141618c22242628d32343638e42444648f
Input: a=25, b=1, c=25
Output:
a123456789101112131415161718192021222324b
Input: a=6, b=6, c=48
Output:
abcdefghi
Input: a=6, b=3, c=48
Output: a3b9c15d21e27f33g39h45i
Input: a=2, b=1, c=100
Output: a1b3c5d7e9f11g13h15i17j19k21l23m25n27o29p31q33r35s37t39u41v43w45x47y49z51a53b55c57d59e61f63g65h67i69j71k73l75m77n79o81p83q85r87s89t91u93v95w97x99y
```
**I'd really like to see an answer in PHP**, but this challenge is open to any language. This is [codegolf](/questions/tagged/codegolf "show questions tagged 'codegolf'"), so the answer should be as short as possible. [Standard rules apply for functions/programs](https://codegolf.meta.stackexchange.com/questions/2419/default-for-code-golf-program-function-or-snippet/2422#2422) and [default loopholes are forbidden](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default).

[Answer]
# [PHP](https://php.net/), 67 bytes
First of all, thanks for posting such a cool challenge! I really enjoyed solving it :) Now, here's my 67 byte solution:
```
<?for(;$i<=($p=$argv)[3];$i+=$p[2])echo$i%$p[1]?$i:chr($l++%26+97);
```
To run it:
```
php -n <filename> {a} {b} {c}
```
Or [Try it online!](https://tio.run/##DchBCoAgEADAz2ygSAczilLpIeIhpFIIXSx6flvHGYxIZJa9VKYhGcsALaz1eLhT/h9hAV3n@RZigdT8kH6BNIdYGZxCNN0gppFrIppIkRz7t@CdSr6ozR8 "PHP – Try It Online")
---
Here's the same solution ungolfed and with explanation comments:
```
$a      = $argv[1];
$b      = $argv[2];
$c      = $argv[3];
$letter = 'a';
for ($i = 0; $i <= $c; $i += $b) {
    if ($i % $a) { // If $i is divisible by $a, the modulo (%) operator will return a remainder of 0, which PHP sees as a falsey value.
        echo $i;
    } else {
        $letter++;
        $letter %= 26; // Wrap $letter around to `a` after it gets to `z`.
        echo chr($letter + 97); // Use PHP's chr function to get the character. 97 is the index of `a`. http://php.net/manual/en/function.chr.php
    }
}
```
---
I did a 60 byte solution, but it doesn't wrap around :(
```
<?for($l=a;$i<=($p=$argv)[3];$i+=$p[2])echo$i%$p[1]?$i:$l++;
```
[Try it online!](https://tio.run/##DchJCoAwDADAz0SoFKEuJ2voQ6QHEZdAaYKKzzf2OCOnqE5h58tAwsUDTWhAEJbreOu5j2UsgsxdrLf1ZKCqoI0BaIRkrVfVQTttnftYHuJ8a5N/ "PHP – Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 15 bytes
```
;0ôWV £CgX/U ªX
```
[Test it online!](https://ethproductions.github.io/japt/?v=1.4.6&code=OzD0V1Ygo0NnWC9VIKpY&input=NAoyCjEwMA==)
### Explanation
```
;0ôWV £CgX/U ªX    Implicit: U, V, W = inputs
;                  Reset C to the lowercase alphabet (among other variable resets).
 0ôWV              Create the inclusive range [0...W], using a step of V.
      £            Map each item X by this function:
       CgX/U         Get the character at index (X / U) in the lowercase alphabet. If X is
                     not divisible by U, this is a non-integer and the result is undefined.
             ªX      In this case (literally, if falsy), replace it with X.
                   Implicit: output result of last expression
```
[Answer]
# [R](https://www.r-project.org/), ~~65~~ 63 bytes
```
function(a,b,c,z=seq(0,c,b)){z[x]=rep(letters,sum(x<-!z%%a));z}
```
[Try it online!](https://tio.run/##K/qfpmCj@z@tNC@5JDM/TyNRJ0knWafKtji1UMMAyErS1Kyuiq6ItS1KLdDISS0pSS0q1ikuzdWosNFVrFJVTdTUtK6q/Z@mYaJjpGNoYKD5HwA "R – Try It Online")
*2 bytes saved thanks to JayCe!*
Returns a list of strings, as R will coerce numbers to strings. To print, simply replace the trailing `z` with `cat(z,sep="")`.
[Answer]
# Clojure, 84 79 77 bytes
```
#(for[i(range 0(inc %3)%2)](if(=(mod i %1)0)(char(+(mod(/ i %1)26)(int \a)))i))
```
Givin' Lisp a little love
[Try it online!](https://tio.run/##NYxNDoIwFAav8iWG8F5c2JYfdeHKYyCLBovWQGlqXXh6LKi7ySQz3TA9XsHM5IN1cXCgUXtQ79BE84xn/TQtSHs/vOcN9VNoLAXtbgaCrOuQFZwpbsn2dKJxusIiY8HU3XWg7WJotzpVcwoiLpqZLfP83zOjyamEghSCkdMRBeS@XFCKpKvVqgoSqlqwRo3y8KXiR6le@zadPw "Clojure – Try It Online")
(-7 bytes thanks to @NikoNyrh!)
[Answer]
# Java 10, ~~93~~ 83 bytes
```
(a,b,c)->{var r="";for(int i=0;i<=c;i+=b)r+=i%a<1?(char)(i/a%26+97):i+"";return r;}
```
Try it online [here](https://tio.run/##pVPfb9MwEH7nrzCRkBLFFN/5Rxy6gpBgEgLEA4/THhzXad2laZe4ZWPq3z6cdh3d4I1L4kui777vzr5bmK15vZhe3a83VeMtsY3pe/LN@JbcvSDRfBtcVxvryPlq9fBvsB@h8@2MVKZLI4QYOiBJdXA2G@@Bu/36QN0HE6LbrvyULKNAeqC4uCSmm/XZCfegVMdnQu5TQytqs9fv7ramI90kScb16iDpJ2zszyZ27PNJlXX5xL8yZ/A@tXPTZal/Y16hyssie@vzGNW5sOla0o1390eZ8aNgpBvSiIJ3gpYUGEVJVbxg9xxUDSCknCKFCOD/gNgBAoxRKASVey6hhxuLE@xj9e5m7Wxw0yEqMVgpC2wKwoGuEWeo5px5LhZcXwlshFpK1kqxknqt8FqprmB9IUKhNxq3Wv0s2U0pbkv9K6GJ4aoCBGkRUEw549zxUmAttISZLBSbK6VKX8hCL7TQxVXJS9UAQ2ByCYOJFpAB8hVgCRzXwDUIuAZRgGQdSAWy7EFJUDrEagdNFEoPqgIUaIuIAhXqKUcuuOLaCRRCKKHrARyphVSFLoFFNQQewyIZFKChxJhIjOcoqgFb2amrZ3O/L6wqLcgpgsOi5nzGy7mQ/hS1uGqW7Wp93fVhs/15c/vLVMnJ7j82Udx1No7ujJhR49pZmI9JnvvTdhwsuD6ksScpMRf@kpJqv9r9ejzA@JH9UdidTkDntya4JyOwZ3zo9MPUPJshepyxI3/29/gZGzamiTVEktEwi5EjxtuTPHydHglG7jqi@/QQlT2v8cdtH9xytNqEUUy4DU2bJmmSmzyhJMmrg7N5kpHJu/h2YMkTkn7/kiWnlRPX9O7/yI8pR/qXkydi5x8@f/308angw1bv7n8D). Thanks to [Scrooble](https://codegolf.stackexchange.com/users/73884/scrooble) for golfing 10 bytes.
Ungolfed:
```
(a, b, c) -> { // lambda taking 3 integer arguments and returning a String
    var r = ""; // we build the result String in steps
    for(int i = 0; i <= c; i+=b) // loop over the range [0,c] in steps of b
        r += i % a < 1 ? (char) (i / a % 26 + 97) : "" + i; // if i is a multiple of a, append the next letter to r as a char, else append i
    return r; // return the result
}
```
[Answer]
# [Perl 6](https://perl6.org), ~~60~~ 50 bytes
```
->\a,\b,\c{[~] (0,b...c).map:{$_%a??$_!!('a'..'z')[$++%26]}}
```
[Test it](https://tio.run/##ZVBNU9swEL37V4iMqZPGGO1qJcukhl650EtvhGFs2UkMiWNih/Ix4a@nUsIQWjwjr@btm/ehplzN1XbdluxRRWbkeYtn9s0si5Kl25PzcRaO83BsXq/fblifh3kURWYQLbLm7NW/Pc4uLvzbo6N@kAVRFLwEg2t/ODxGdbPZbP3vl1dRPT@papay3rge172RE//ZlW1noXlVl@1eyWNscdae2sFYkKUB839k55YyLoYsCIM9nu/w/Atudrh5x/fYr3XXrLszt1jurrvtlduejuxv6AxCN/L9MHa8fZBD1svSPSVP9xyTOlLP23juqX7bCiOvmWc1G@76jLzJcvVe7eSc9ZmfhczP7TH2lE9NabqysNeibA0bMFe5apl7576lWqZvBl@Z3mZ7WbsmLEvJhUGXBDj33ht6GebKAC@AStATxCmqmeCVoDuh7wnnpBaS15KWUjcKH5RaxbyNqYv1WuOjVn8S/pTQc6JfPO/DKnFWYmcV08FKqBwQpEFAKgQXohQJ4YS0hKmMFZ8ppZIqlrG@06Tj@0Qkag4cgcsFuI9qQA4oloAJCGxAaCB4AIpB8hVIBTJpQUlQunPOh0TAP9rLz@VJaZeJQIE2iEioUBcCBQkldElIRIr05JMUSicFTgrlQcrGIqlinQC3SRGEFbVBIAYNCdoSVl0g5Z@UlBNSToj0QSg3RTmZzqr/ieJfIstEnhiQBUKJ8USIqUhmJKu/ "Perl 6 – Try It Online")
```
{$^a;(0,$^b...$^c).map:{$_%$a??$_!!chr 97+$++%26}}
```
[Test it](https://tio.run/##bVBdU9swEHz3rxAZ04QmBN3pJEtJDX3lhb70kYGxZSUxJI6JHcrHpH89lRKG0FLNSKfZ29nbvdqt5mq7bhx7VEM7jqLFM/til4Vj6fY1vsnGPT6Ib/LhcBjf2JPhIqtHr/HtcZxdXMS3R0d2tmIm6cf9/jGqzWYbf728Glbz07JiKetcV9dVZxwkv7euaT00LyvX7FUixhaj5swXxrpZ2mXxt@zcU66LPusOuns83@H5J9zucPuG77Ef67Zet6PQWO6@u@5V6J6N/dMPAwah5Ptiffn9Th6wTpbuKXm659g0kDrRJgoL@ukjjKN6nlWsv8szjibL1Vu003PWY3E2YHHur/XXPdXOtq7w38I1lp2wELkosykL@@15sufGfql3y7IahWzBZdn8r/1ZL9psL6uQl2UpBcsY/ALn0dseogxzZYEXQA70BHGKaiZ4KehO6HvCOamF5JWkpdS1wgelVglvEmoTvdb4qNUvw58MPRv9EkXvo0wYJXajEjqMEioHBGkRkArBhXDCEE5IS5jKRPGZUsqUiUz0nSad3Bth1Bw4ApcLCIcqQA4oloAGBNYgNBA8ACUg@QqkAmkaUBKUbsPkgyPg7@nlx/CkdPBEoEBbRCRUqAuBgoQS2hESkSI9@SCFMkhBkEJ5kPK2SKpEG@DeKYLwot4IJKDBoA/h1QVS/kFJBSEVhEgfhHJbuMl0Vv5LFH8TWSZyY0EWCA6TiRBTYWYkyz8 "Perl 6 – Try It Online")
```
{  # bare block lambda with parameters $a,$b,$c
  $^a; # declare param $a, but don't use it
       # (so $a can be used in the inner block)
  (
    0, $^b ... $^c  # the base sequence
  ).map:            # for each of those values
  {
    $_ % $a         # is it not divisible by `$a` ( shorter than `%%` )
    ??  $_          # if it isn't divisible just return it
    !!              # otherwise return the following
        chr         # a character from the following number
          97 +      # 'a'.ord +
          $++       # self incrementing value (starts at 0)
          % 26      # wrap around back to 'a'
  }
}
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 62 bytes
```
(a,b,c)=>(g=k=>k>c?'':(k%a?k:Buffer([97+x++%26]))+g(k+b))(x=0)
```
[Try it online!](https://tio.run/##bdHbToNAEAbge5@CG1MI2O4c9tSEmvgaxgtYdoHSlqYe0vryuJpGDZrs5fxf/tnZVm/Vszv1x5e7w9j4KZRTWhV14bJyk7blUG6GjbtfLNbpcFvdD@uH1xD8KX20Oj/n@S2qpyzL23TI6yxLz6XIJjcensedX@7GNg1pwkWCRQJCZFmyWiUV1sqBaIA9mIDYoupI9MRbMgPjjtVeioPkcblcXqx5v5lxtkgocpqvHKkaEKRDQG5IEHmyjIGNhFZqJTqllO21jNxLTM04EF/tEvndjpX5BBkUGIeIjApNQ0hMioxnZGbFJswglLFUhFBeIYgJqbSxIAAiSJGUEdVgwKKIdREJuZ7vp4rPl7C5OrVrfGi7/p85@j1HtXUgGwSPOhC1ZDuWf1L41fLnGFCTk432NgC0QB3IHvQW7ICwQ9qjPKAe0R7j752tvUwf "JavaScript (Node.js) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~17~~ 15 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
/Ý¹*εD³ÖiA¾è¼}?
```
-2 bytes thanks to *@MagicOctopusUrn*.
Takes the input in the order `bca`.
[Try it online](https://tio.run/##AScA2P8wNWFiMWX//y/DncK5Ks61RMKzw5ZpQcK@w6jCvH0///8zCjQ4CjY) or [verify all test cases](https://tio.run/##JYvBasJAGITv/1MMeNGiuLsmUaEgBSnk3oqlgmySH1zaGrpZxR7yGt567wvoSTwk975STCIMM8zwjfB1JLkaP4evYbhYVsPyd/nwf5q/lUfzVFzLv@KSz6p8VZxn9F5cVVAeO/WE/BvA4wAvG5Oh1i7jBC6F5Ywd3IYRp7utY7vea2t09MmIdPzRIGab8AEC3dQ2NWJ8pZbBBx27PjQSszeZaR8/UEGvUiSFII9GJMceTUmRL@qJJCm/UUDepLbRPWRLqxs).
**Explanation:**
```
/               # Divide the second (implicit) input `c` by the first (implicit) input `b`
                #  i.e. 2 and 100 → 50
 Ý              # Take the range [0, `divided_c`]
                #  i.e. 50 → [0,1,2,...,48,49,50]
  ¹*            # Multiply it with the first input `b`
                #  [0,1,2,...,48,49,50] → [0,2,4,...,96,98,100]
    εD          # For-each in this list:
      ³Öi       #  If the current number is divisible by the third input `a`:
                #   i.e. 8 and `a=4` → 1 (truthy)
                #   i.e. 10 and `a=4` → 0 (falsey)
         A      #   Push the lowercase alphabet
          ¾     #   Push the counter_variable (which starts at 0 by default)
           è    #   Index the alphabet with this counter_variable (wraps around by default)
         ¼      #   Increase the counter_variable by 1
            }   #  Close the if
             ?  #  Output without new-line
                #  (If the if was not entered, the input is implicitly output as else-case)
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 74  72 bytes
```
i,l;f(a,b,c){for(i=l=0;i<=c;i+=b)i%a?printf("%d",i):putchar(l++%26+97);}
```
[Try it online!](https://tio.run/##ZcrRCoMgFIDh@x5DEI54Bmpla072LOZwO1AtWruKnt0Fu2t3Px9/PD1izJmwdwkCdhjFml4zkO@9cnT10ZH0nSAebtNM45KA8TtDEpfps8RnmKGXkhsr20a4LQ@BRhBrkaBCg1op4Yp9fANjeyVosUTdVAfVap/r42tq1Gjqg1q0WJ3/sPzhlr8 "C (gcc) – Try It Online")
[Answer]
# Python 2, ~~80~~ 70 bytes
Returns a list, since the OP said that is acceptable.
```
lambda a,b,c:map(lambda x:x if x%a else chr(x/a%26+97),range(0,c+1,b))
```
Very different approach from the [other Python 2 answer](https://codegolf.stackexchange.com/a/170230/73884).
[Try it online!](https://tio.run/##LYzLDoIwEEXX@hWzIWnDJLblJSR@ibqYViokUEhlUb@@ArI7Obn3zN@lm5yKFm7wiAON@kVAqNE0I83sEKEJ0FsICUE7fFownWfhQokq07ri6Mm9WybQpBI159FOHtge4dA7uLMcFUohOAKrMUNZ5RtKsepit6pAiarYsMQS8@ufsoP2/7p8NufT7Hu3gF37oBEMjz8)
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 23 bytes
```
q~),@/f%{0W):W26%'a+t}%
```
[Try it online!](https://tio.run/##S85KzP3/v7BOU8dBP0212iBc0yrcyExVPVG7pFb1/39LBWMFQ3MTAA "CJam – Try It Online")
```
q~                              a b c
  ),                            a b [0…c]
    @/                          b [[0…a-1] [a…2a-1] ... […c]]
      f%                        [[0 b…a-b] [a a+b…2a-b] ... […c]]
        {0          t}%         Replace each first with:
          W):W26%'a+            ++W % 26 + 'a'
```
Reading input as `b a c` and dropping the `@` would be 22 bytes (not sure if that's valid).
[Answer]
# [Python 2](https://docs.python.org/2/), ~~65~~ 63 bytes
Returns a list, since the OP said that is acceptable.
```
lambda a,b,c:[[chr(n/a%26+97),n][n%a>0]for n in range(0,c+1,b)]
```
[**Try it online!**](https://tio.run/##DYxLDoIwFADX9BTdmLTyEtvyUUhwJ1sPgCwKFmmCD1JqlNNjV5PMJLNsfpxR7UP12Cf97p6aauigL5umHx3Dkz6oPC7OHLBt8KCvoh1mR5FapE7jyzABfSyh4@3@He1kqCxJ5N1W1tXAjhaXj2eck8j8erN4ervXN@fCQa/UlOZnQyXR4ix6OtnVs5rvKSiQQpACEpDnlEgRRCaIykCCykgOOaSXgCTgDw "Python 2 – Try It Online")
---
Previous versions used during the creative process (working backwards):
**84 bytes**
Returns a generator expression.
```
def f(a,b,c,x=0):
    for n in range(0,c+1,b):yield n%a and n or chr(x%26+97);x+=n%a==0
```
**111 bytes**
Uses a generator for the alphabet and returns a list.
```
def g(x=0):
    while 1:yield chr(x%26+97);x+=1
A=g()
f=lambda a,b,c:[n%a and n or next(A)for n in range(0,c+1,b)]
```
[Answer]
# [PHP](https://php.net/), 79 bytes
*Note: Not too good at PHP*
```
<?for(@$l=a;$i<=($p=$argv)[3];$i+=$p[2])$o.=$i%$p[1]?$i:substr($l++,-1);echo$o;
```
[Try it online!](https://tio.run/##DchBDoIwEAXQy3ySNhVD0ZVlgvcgXQBBaUKYSYse35Hle7KKate/OJsnNhoDUkcGQhjz@2uHWzzHEWRoowVfCak64WOP9CifqRzZYHPuUnsblnllcFDVu7bqm@bHciTei9b7Hw "PHP – Try It Online")
---
# [PHP](https://php.net/), 84 bytes
This is just the same above code just in function format (since you wanted a PHP answer maybe this is better for you)
```
function f($a,$b,$c,$l=a){for(;$i<=$c;$i+=$b)$o.=$i%$a?$i:substr($l++,-1);return$o;}
```
[Try it online!](https://tio.run/##ZcpdC4IwFIDh6/YrRpxgw5M4P/qa5h8JQkVzENs46VX0280u06sXHl7f@ykvfe9ZS@ToTq13NBj7EJHUUzfaZjDO8k5AhVAjNAjPopLvzpHQYPICmjlBAbUEFxZgdlCVYC6vsX4NJOAZBLhXUlM7jGTB6c/UNr3jbNOJFGNUUSR5yLc3e7NbHv74jAmqY7pkFc17trrjDBXG2ZIPeMD0tNbkX5lmrLxOXw "PHP – Try It Online")
[Answer]
# Excel VBA, 76 bytes
Takes input, `a`,`b`, and `c` from `[A1]`, `[B1]` and `[C1]`, respectively then outputs to the VBE immediate window.
```
For i=0To[C1]Step[B1]:j=i Mod[A1]:?IIf(j,i,Chr(97+k)):k=(k-(j=0))Mod 26:Next
```
[Answer]
# [Python 2](https://docs.python.org/2/), 83 bytes
```
f=lambda a,b,c,s=0,p=0:c>=s and[chr(p%26+97),`s`][s%a>0]+f(a,b,c,s+b,p+(s%a<1))or''
```
[Try it online!](https://tio.run/##LY3NCoMwEITvfYq9FBOyhxj/qlRfRASTiCi0MSRe@vRpDMIe5pthduzv3A4jQlj7j/yqRYJEhRp9z9H2vNND70GaZdSbI/YpatY2FGc/T6N/yoFPbCV3gym0jET3nVN6uCwL6@HiO1AIGnYDpEQQCDnnFIG0CEWEprwg5ymqUiKq6EeuLqgR4pWvWxdJdw8A63ZzwrWeBmj4Aw "Python 2 – Try It Online")
[Answer]
# Kotlin, ~~80~~ 79 bytes
-1 thanks to [O.O.Balance](https://codegolf.stackexchange.com/users/79343/o-o-balance)!
```
{a,b,c->var s="";for(x in 0..c step b)s+=if(x%a>0)x else(x/a%26+97).toChar();s}
```
[Try it online!](https://tio.run/##ZY7dasJAEEav61N8CMIurukaE39iE5Be9bpPMAlZuzRuZHeVFPHZ0yV6USsMfMOZw8x8t77Rpj9TA5WBUYYP4wXKe1ZDcswKfHqrzR55fyFRimpWnMnC5ePxVrWWddAGMooqOF8fUXI3zbVi3YQKyTvUjatZ90qTeDndrHjk2/cvsoxv3bVXJ4MDacPI7l2GnbX083a7VnBcRi/H0PrGMMUSgVhgLiXnf/FGYBHwKnnEczno6T87ToMbJukjXgqEStZPdPFM738Mm6/9Lw)
My first time golfing (or doing anything else) in Kotlin! Probably can be improved.
Very similar to [this Java answer](https://codegolf.stackexchange.com/a/170224/73884), I realized after writing it. Save on the `return` and lose on the ternary for almost the same score.
[Answer]
# Python3 - ~~111~~, ~~101~~, ~~98~~, 94 bytes
```
q=iter(map(chr,range(97,123)))
[next(q)if x%a==0else x for x in[y*b for y in range((c+b)//b)]]
```
Probably not the shortest, but there's room for improvement
[Try it online!](https://tio.run/##JYxBCsMgEADvecVeCrttoCYplBz2JSEHFdMIrRprQV9vk/YyMHOYUNLq3VAl3xrFfaO5E6JubJOJ@JIB9RrbKN3D4Hhvu34gosZ/Ek/O5IQbgV0gnySzAPN8G8iw@LjTOpjKWf2sHPafWJcQ9UXRVRHNcw3xKPuQ6hc "Python 3 – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 22 bytes
```
ＮθＮη⭆Φ⊕Ｎ¬﹪ιη⎇﹪ιθι§β÷ιθ
```
[Try it online!](https://tio.run/##TYvBCoMwEETv@QqPG0hBS2@eCqWQg1JofyCapQbiRsNG2q9PI704l8e8YcbJxDEYn7OmJXGf5gEjrLIVxz6V/oiOGJ5c8O7MAnfnuUyaxogzEqOF40VKVfWBoQs2@QBOVZPc3Qsjmfg9@LXYgitrsviBQVWa@OY2Z/E/72lzvoizaOo6nzb/Aw "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
Ｎθ                      Input `a`
  Ｎη                    Input `b`
       Ｎ                Third input (`c`)
      ⊕                 Increment
     Φ                  Filter over implicit range
           η            `b`
          ι             Current value
         ﹪              Modulo
        ¬               Not (i.e. divisible)
    ⭆                   Map over result and join
              ι         Current value
               θ        `a`
             ﹪          Modulo
            ⎇           Ternary
                ι       Current value
                    ι   Current value
                     θ  `a`
                   ÷    Divide
                  β     Predefined lowercase alphabet
                 §      Cyclically index
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~71~~ 69 bytes
```
(a#b)c=do n<-[0,b..c];[show n,[['a'..]!!mod(div n a)26]]!!(0^mod n a)
```
[Try it online!](https://tio.run/##ZZHJahtREEX3/oo2ClgCW7yaq0j8B9llKRxQT@rW0K1Ztn9eaYt4EectL5dzT/Ga@WFVrdfX63g@yifFc9ln3Y@nWXrMp9Pi5fvs0PSXrHuczR7mD9Ppy/39pi/HZXvOumw@QX0ZknH6PYS34LqZt132nJX9XbY9HX8d9z@77Fs25hFOIKW77OlpjrkWkErgCrxGXKA2lFriJfmKcc26kdQJ9@JbxZ3q3tLB@Gh@cjy7XiK9Br@Fv9/9uxEjmoDxbYM0BwQpEJBLSkQVBWPNLrAQ09SoarQm5ktnt1VQ6BoSQpINfDzuABMg9YABhFsgB4YdsIGkPYiCxAFUQP34MfqvCqThXvl7Lqt/yDAoeIGIjIpeEhKTkleMzKzs9RcGyggmKDfGIMKi5gFpcEOggTZMg4FD4KA9YAk5/4LQkU7Yb4S8KKt60bT/NeizQXkUICVChVYTLSgalq99HJw@/xFyKqS0KmqABVAD0oItIVYIa6QNSofWY2wJdkR7kgPZkeLEcGa6sLyyvXG8C8yFcpFCrJSoFGqlhUqj1mosDVZGa5ONWWfRO2yddi57t4PHMeAUdA65hL1GvF3/AA "Haskell – Try It Online")
---
**Previous 71 bytes:**
```
(a#b)c=do n<-[0,b..c];last$show n:[[['a'..]!!mod(div n a)26]|mod n a<1]
```
[Try it online!](https://tio.run/##ZZHLTuNAEEX3fIVRkCDSEHW9u2bgD2Y3yygLP2Mnjp3EeQCaf884aFgAteqSrs49pa7TYV227eXykE6yaf5c9En39DgPP7LZLF/8atPhcDfU/Tnpfs7n8/v0fjZb3N5u@uKhaE5Jl6RT1MXfcb@@n2Bx2aRNlzwnRX@TbI@HP4f97y65Sx54glMI4SZ5fEwx0xxCAVxCrBCXqDWFhnhFcc3Ysm4kdMK9xK3iTnVvYTA@WDxGPEU9e3hxfvX4dvO5wyc0BeP3DtIMECRHQC4oEJXkjBVHgaWYhlpVvTGxuIocbe3k2kJACLKB63AHGACpB3Qg3AJFYNgBG0jYgyiID6ACGg/X0s8qEMZ75f@5rPEqw6AQc0RkVIwFITEpxZKRmZVj9YWBMoEpyjtjFGFRiw5hdEOgkTZWg0EEx1F7xBJy9gWhE51yfCdkeVFWy7r5lqCPBGWegxQIJVpFtCSvWb7mcXT6@EfIKJfCSq8AlkA1SAO2Al8jtEgblA6tR98S7Ij2JAPZgfzIcGI6s7ywvbK/CaRCmUguVoiXCpXSUqVWa9RXBmuj1mRj1pn3EbaRdlH20YboB4ej08nl7Pbi/nr5Bw "Haskell – Try It Online")
**Explanation:**
```
(a#b)c=                         -- given the inputs a, b and c
  do n<-[0,b..c];               -- take n from the range from 0 to c with increments of b
  last$   :[   |mod n a<1]      -- if n is not divisible by a
       show n                   -- then use n converted to a string
            [   mod(div n a)26] -- otherwise divide n by a
             ['a'..]!!          -- and use the character at this position in the alphabet
```
[Answer]
# [CJam](http://www.sourceforge.net/p/cjam), ~~64~~ 63 bytes (*ouch*)
```
97:Y;riri:Bri\/),[{B*}*]{X\_@\%0={Yc\Y):Y'{i={97:Y;}&}{X\}?}fX;
```
 [Try it online!](http://cjam.aditsu.net/#code=97%3AY%3Briri%3AB%3Bri2%2F1%2B%2C%5B%7BB*%7D*%5D%7BX4%250%3D%7BYc%5CY)%3AY%3B%7D%7BX%5C%7D%3F%7DfX%3B&input=4%202%20100)
**Explanation**
```
97:Y;                                                                 Set a variable "Y" to the ASCII value of 'a' and pop the variable from the stack
     ri                                                               Read one chunk of the input (Space-delimited)
       ri:B                                                           Set a variable "B" to the next input chunk
           ri\/                                                       Divide the next input chunk by the top value in the stack (B)
               1+                                                     Add one to make the values inclusive
                 ,                                                    Turn it into an array
                   {B*}*                                              Multiply all the array values by B
                  [     ]                                             Capture the results in an array
                         {                                   }fX      Massive for loop
                          X\_@\%0=                                    If X modulo (A value) equals zero
                                  {                   }               If condition true
                                   Yc\                                Push the character with an ASCII value of Y
                                      Y):Y                            Increase the value of Y
                                          '{i=                        If Y's value is that same as that of "{" (the character after z in ASCII)
                                              {97:Y;}                 Set Y's value back to ASCII 'a'
                                                     &                If-only flag
                                                       {  }           If condition false (from X\_@\%0=)
                                                        X\            Push X onto the stack
                                                           ?          If-else flag
                                                               ;      Pop A value from the stack
```
---
This could definitely be made better so feel free to join in!
---
### Changes
[Helen](https://codegolf.stackexchange.com/users/58707/helen) cut off a byte!
Old: `97:Y;riri:Bri\/1+,[{B*}*]{X\_@\%0={Yc\Y):Y'{i={97:Y;}&}{X\}?}fX;`
New: `97:Y;riri:Bri\/),[{B*}*]{X\_@\%0={Yc\Y):Y'{i={97:Y;}&}{X\}?}fX;`
By changing `1+` to `)` we can cut off a byte.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 16 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
Żmọ⁵œpƊżJṖØaṁƲ$F
```
A full program taking arguments `c b a` which prints the result.
**[Try it online!](https://tio.run/##AS8A0P9qZWxsef//xbtt4buN4oG1xZNwxorFvErhuZbDmGHhuYHGsiRG////MTc0/zP/OQ "Jelly – Try It Online")**
[Answer]
## Clojure, 117 bytes
```
#(loop[R""A 0 i 0](if(> i %3)R(let[?(=(mod i %)0)](recur(str R(if ?(char(+(mod A 26)97))i))(if ?(inc A)A)(+ i %2)))))
```
Such imperative. :/
[Answer]
# C (gcc/clang), ~~80~~ 68 bytes
```
f(a,b,c,i){for(i=0;i<=c;i+=b)i%a?printf("%d",i):putchar(i/a%26+97);}
```
Port of my Java [answer](https://codegolf.stackexchange.com/a/170224/79343). Try it online [here](https://tio.run/##ZZDNboMwDIDvPIUVCSkRnkooLetStgepegihbD6sVIXtMJRnZyZ0Eu0Sy46cz7/u6d25cWykxQodkhqa9iqpTA3tS2coKStFsX27XOncN1LEtWDo5fLVuw/L4MrG2TbZFcr48bulGvpT10tmwSJMppqNUzBEsDh/CWVcYxAF5SsInOI4xilzh98afPByG50Ugr0@mqp8WjrLZaXQyOEIJQw57lCnmG1wy1d7cwdVM5ThGjPUDKz/IW5GdJqiLnLchFz58yRZsWDDApknplPDZg8d/ZxaHkGtbi/@VwaShB7XEtZnD3TkLQTtWC@m9pEffwE).
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 14 bytes
```
Żmµ⁵ḍaÄ$aị¥Øao
```
[Try it online!](https://tio.run/##ASoA1f9qZWxsef//xbttwrXigbXhuI1hw4QkYeG7i8Klw5hhb////zEwMP8y/zQ "Jelly – Try It Online")
[Answer]
# Python 2 and 3 - ~~123~~ 128 Bytes
```
d=-1
lambda a,b,c:[s()if i%a<1else i for i in range(0,c+1,b)]
def s():global d;d=(d+1)%26;return'abcdefghijklmnopqrstuvwxyz'[d]
```
You'll need to put `f=` in front of the `lambda` and then call it with `f(a,b,c)` but I'm pretty sure that's allowed.
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~59 58~~ 55 bytes
```
->a,b,c{[w=?a]+b.step(c,b).map{|x|x%a>0?x:w=w.next[0]}}
```
[Try it online!](https://tio.run/##Ncy7CsMgAEbhvU/RpdDLX1Gj6QVMHkQcNCRbirQpWhKf3ZpCt48znOfbffKg8rmxcOhmHVRrzcmR19T7fQd3IKP18xKXuLMNbeM9qEAefZw0NSllrQU4GKUG@oYK7CKKGC1Rro1LMHBZVKOGuP5QrTD/8cZvB32MJuUv "Ruby – Try It Online")
Returns a list
]


[Question]
      [
We all know of different fancy sorting algorithms, but none of these give us numbers in a way that's easy to pronounce. To remedy this, I propose using PronunciationSort™, the most natural way to sort lists of numbers.
## Pronunciation
The official rules for pronouncing numbers (in this challenge) is that the digits are pronounced one by one, and the resulting string is sorted in lexicographic order. As an example, this means that the number `845` is pronounced `"eight four five"`, and should be sorted accordingly.
### Negative numbers
Negative numbers are pronounced by prepending the word `"minus"`. Thus, `-23` is pronounced as `"minus two three"`. Note that this causes negative numbers to end up in the middle of the output, right between numbers starting with `4` (four) and `9` (nine).
As a guide, the official order of words for PronunciationSort™ is:
* eight
* five
* four
* minus
* nine
* one
* seven
* six
* three
* two
* zero
That is,
```
8, 5, 4, -, 9, 1, 7, 6, 3, 2, 0
```
## Input
A list of integers in the range \$[-999, 999]\$, containing at most 100 elements. Input as a list of strings is not permitted. If your language does not support input as list, it is permissible to give input as separate integers.
The input will not contain any invalid numbers, or any number starting with a 0 (except the number 0 itself). The input will generally not be sorted, it can be given in any order.
## Output
The same integers, in PronunciationSort™ order. Note that the numbers should only be converted to their pronunciations to get the sorting, the output should not contain any strings.
## Examples
For the examples, the middle step (wrapped in parentheses) only serves as a guide, and is not a part of the output.
```
[1, 2, 3] -> (['one', 'two', 'three']) -> [1, 3, 2]
[-1, 0, 1, 2] -> (['minus one', 'zero', 'one', 'two']) -> [-1, 1, 2, 0]
[-100, 45, 96] -> (['minus one zero zero', 'four five', 'nine six']) -> [45, -100, 96]
[11, 12, 13, 134, 135] -> (['one one', 'one two', 'one three', 'one three four', 'one three five']) -> [11, 13, 135, 134, 12]
```
There's also a [script for verifying your results](https://tio.run/##XVDLboQwDDyTr7By2aCmqO32re6XoNUKFQNuwYmCYbv9eRpCL@3JM5E9Mxl/kc7xfllo8C4IVKMoVWMDLcrJB8du4nc0nL@qjBpgeIObCLOAMgUGPRBPI2i4@ndwzbnKzi7UIxygPKqsppYkEf2NwWkL2jGuQ86JSRcw8cZNQdvooRua08tIX2ngjLwCpLaTFTBFiSjeuADJAIhhlLDl3fyLynvk2mwBSmLZYH6MCX@/sYNd8eGITbrIlVI8DWvYWEfRk2Co@hPOVW@I/SQmz5UPq9IYO8ParNsWPvFy@NNCXFuW8tbe2b29tw/20T7ZZ/ty/AE).

[Answer]
# [Haskell](https://www.haskell.org/), 57 bytes
```
import Data.List
sortOn$map(`elemIndex`"54-9176320").show
```
[Try it online!](https://tio.run/##dY1PC4JAEMXvfoqHeDBYxfVfKdSpixB06CiCS226pJu4G/Xtbeze4c283@MN0wvzkMOwLGqcnrPFUVgRnpSxzn1vKDhrbxST38pBjpW@yU/rZmlQ8G2exJG7CU3/fC8d9lgNQtxJ/izFDWWJi52V7hAcUFfaNhtnFEpTV2krZ3G18PDSg9LS0BW9QUf7x0vNGWKGpHHqgGzEsAY/igjSjKHICTnFnIo8WZWuI/sTM@yaLw "Haskell – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~15~~ 13 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ṾV€ị“Þ⁽3Z6»µÞ
```
**[Try it online!](https://tio.run/##y0rNyan8///hzn1hj5rWPNzd/ahhzuF5jxr3GkeZHdp9aOvhef///4820FGwNAViEx0FEyBtAqR1LUDYEERYxAIA "Jelly – Try It Online")**
A monadic link accepting a list of integers which yields a list of integers.
### How?
Sorts by the ordinal values of the digits of the integers (where `-` is a "digit" of -1) converted to strings using the characters at their 1-based & modular index in the magic string "murgeon lix".
The sort is effectively alphabetic where a space is considered less than any letter.
The magic string "murgeon lix" was found by inspecting Jelly's dictionaries used in compression. There are no words of 11 letters which satisfy the requirements (and none of more that would upon de-duplication). since a space sorts before letters the next most obvious choice is a word of length seven followed by a space followed by a word of length three. "murgeon" and "lix" is the only satisfying combination, although without a space others may be possible (e.g. `“£Py:ƥ»` is "murgeonalix" which works for the same byte-count)
```
ṾV€ị“Þ⁽3Z6»µÞ - Link: list of integers
            Þ - sort by:
           µ  -   the monadic link: -- i.e. do this for each integer, then sort by that
Ṿ             -     unevaluate  (e.g. -803 -> ['-','8','0','3'])
 V€           -     evaluate each as Jelly code  (e.g. ['-','8','0','3'] -> [-1,8,0,3])
    “Þ⁽3Z6»   -     "murgeon lix" (compression of words in Jelly's dictionary plus a space)
   ị          -     index into (1-indexed & modular) (e.g. [-1,8,0,3] -> "i xr")
```
---
[Previous @ 15 bytes](https://tio.run/##y0rNyan8///hzn1hj5rWPNzd/ahhzqGFUfmPGrc9aph5dJL9oSWHth6e9////2gDHQVLUyA20VEwAdImQFrXAoQNQYRFLAA "Jelly – Try It Online"):
```
ṾV€ị“¡Zo⁶’Œ?¤µÞ
```
Here `“¡Zo⁶’Œ?¤` finds the first permutation of natural numbers which would reside at the index 21,340,635 when all permutations of the numbers are sorted lexicographically - which is `[6,10,9,3,2,8,7,1,5,4,11]`. (`“¡Zo⁶’` is a base 250 representation of 21340635, while `Œ?` does the calculation and `¤` groups these instructions together)
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/tree/fb4a2ce2bce6660e1a680a74dd61b72c945e6c3b), 15 bytes
```
Σε•Koéa₃•'-3ǝsk
```
[Try it online!](https://tio.run/##MzBNTDJM/W/i9v/c4nNbHzUs8s4/vDLxUVMzkKmua3x8bnH2/9panf/RhjpGOsaxXNG6hjoKBjoKQNIIzDMAckxMdRQszYBcQ6CwoREQG4OwCYgwjQUA "05AB1E (legacy) – Try It Online")
**Explanation**
```
Σ                 # sort by
 ε                # apply to each
             sk   # index of the element in
  •Koéa₃•         # "85409176320"
         '-3ǝ     # with "-" inserted at index 3
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 30 bytes
```
*.sort:{TR/0..9-/a5982176043/}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPtfS684v6jEqjokSN9AT89SVz/R1NLCyNDczMDEWL/2vzVXcWKlQpqGSrymQlp@EVe0oY6CkY6CcawOV7QukG2gowASgXANgDwTUx0FSzMQ3xAoYQhUa2gMwiYgwjTW@j8A "Perl 6 – Try It Online")
Port of G B's Ruby solution.
### Original 35 byte version
```
*.sort: (~*).uninames».&{S/\w*.//}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPtfS684v6jESkGjTktTrzQvMy8xN7X40G49tepg/ZhyLT19/dr/1lzFiZUKaRoq8ZoKaflFXNGGOgpGOgrGsTpc0bpAtoGOAkgEwjUA8kxMdRQszUB8Q6CEIVCtoTEIm4AI01jr/wA "Perl 6 – Try It Online")
Convert each number to a string, get the Unicode name of each character, strip the first word ("DIGIT" or "HYPHEN"), then sort.
[Answer]
# Python 3, ~~68 bytes~~ ~~67 bytes~~ 64 bytes
```
lambda x:sorted(x,key=lambda y:[*map('54-9176320'.find,str(y))])
```
Uses built-in `sorted` function with an anonymous lambda for the key. Hard-code the sort order and compare each digit in each value in the input list to its position in the sort order list.
*Edit: Saved 1 byte by removing `8` from sort list to take advantage of `str.find` returning `-1` when parameter is not found. Thanks to maxb.*
*Edit2: Saved 3 bytes by using starred unpacking syntax in a `list` literal instead of `list` constructor*
[Try it online!](https://tio.run/##XcxBCsMgEAXQfU/hLgqmaNSkCeQkbRcWI5UmRtRFPL1VKIV2YGbx/mdcis/dsqznW17l9lASHFPYfVwUPPBrSfNH07SaEOEmHWwugrcjHXrWkeasjVU4RA8TKpOdNzZCDa8Ugw4Ddkfo9LW2IMGgRn9OCnOBwdj/BLRUaXlDWV1ejyiF/AY "Python 3 – Try It Online")
[Answer]
# [JavaScript (SpiderMonkey)](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/45), 69 bytes
```
a=>a.sort((a,b)=>(g=n=>[...n+''].map(c=>':598217604'[c]||3))(a)>g(b))
```
[Try it online!](https://tio.run/##bZDNcoMgFIX3fYq7A6ZK/Ilp0xl4EYcFsWhoIzhg0p/Ju1sxOpM6WQAXLnzncD7kRfrK6a6PfafflWut@VQ/Q80Gybik3roeYxkdCOO4YYbxklJqnhEStJUdrhhHb8X@NUtfdskWlZW4XnNCsCS8wQdChsoab0@KnmyDa1ymEWQR5IIQ2Gwg5oBLZI1CEaD@y07L0SmFBAnNcD0fX4inFSYeG0kEgfYP1Wpz9jADf5WbiHf8GRue35wkD9DJSN4WEex3j9kQwLDQa3t2UOvLpGH02Pb6exEKmBtwhK2V0uBi9JDmYWzDVKyDWf4SyjmgqZxCut9A8LE6CaaWINNFp1jEMjH8AQ "JavaScript (SpiderMonkey) – Try It Online")
[Answer]
# [K (ngn/k)](https://bitbucket.org/ngn/k), ~~21 20~~ 22 bytes
```
{x@<"54-9176320"?/:$x}
```
[Try it online!](https://tio.run/##JYrLCsIwEEX3fsVQutBFMJOXJCPof5RA3USkUqF0kVLqr8eJhZnhnnNnEONzLCWFNd@vjTXC48VpJZvbObR5K3NY2275TiFBpv4z0LFPj9ebMi00neJ2mDsEBZoQNKjIKBAksCMOtZK7lBKMBe@I75@8qwXykwLUPIbXUhWV7G5ULD8 "K (ngn/k) – Try It Online")
`{` `}` function with argument `x`
`$` format as strings
`"`...`"?/:` find indices of individual characters in the given string (or \$-2^{63}\$ for not found - note that the `"8"` is missing)
`<` compute sort-ascending permutation
`x@` the argument at those indices
[Answer]
# Pyth, ~~17~~ 16 bytes
```
oxL"54-9176320"`
```
Try it online [here](https://pyth.herokuapp.com/?code=oxL%2254-9176320%22%60&input=%5B-100%2C%2045%2C%2096%5D&debug=0), or verify all the test cases at once [here](https://pyth.herokuapp.com/?code=oxL%2254-9176320%22%60&test_suite=1&test_suite_input=%5B1%2C%202%2C%203%5D%0A%5B-1%2C%200%2C%201%2C%202%5D%0A%5B-100%2C%2045%2C%2096%5D%0A%5B11%2C%2012%2C%2013%2C%20134%2C%20135%5D&debug=0).
```
oxL"54-9176320"`NQ   Implicit: Q=eval(input())
                     Trailing N, Q inferred
o                Q   Order the elements of Q, as N, using...
               `N      Convert N to string
 xL                    Get the index of each character of that string...
   "54-9176320"        ... in the lookup ordering
                       (if character missing, returns -1, so 8 is still sorted before 5)
```
*Saved 1 byte thanks to @ngn and [their K answer](https://codegolf.stackexchange.com/a/172893/41020), by omitting 8 from the start of the dictionary string*
[Answer]
# Japt, 19 bytes
```
ñ_s ®n"54-9176320
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.6&code=8V9zIK5uIjU0LTkxNzYzMjA=&input=Wy0xMDAsNDUsOTZd)
* Save 2 bytes thanks to [ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions).
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 36 bytes
```
T`-d`3:598217604
O`
T`3:598217604`-d
```
[Try it online!](https://tio.run/##K0otycxL/K@qEZyg8z8kQTclwdjK1NLCyNDczMCEyz@BKwRZACj/PyaPS@e/oY6RjjGXrqGOgQ6QCWQYGOiYmOpYmnEZGuoYGukYGgORCRCbAgA "Retina 0.8.2 – Try It Online") Link includes test suite. Explanation:
```
T`-d`3:598217604
```
Translate the minus sign and digits to their position in pronunciation order, using `:` for 10th position.
```
O`
```
Sort in pronunciation order.
```
T`3:598217604`-d
```
Translate the order back to the original minus sign and digits.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 50 bytes
```
->a{a.sort_by{|x|x.to_s.tr('0-9-','a5982176043')}}
```
[Try it online!](https://tio.run/##HY1BCsMgFET3PYU7W/iKRk3rornIR4JZZFcSjAFD4tmNdjHDvGFgwj4dZf4WNvjT820JcZyO80pX4nEZNx7DkwpmGQXqjf108t0Lregr54IogXRAlANkNQogrfiTqKANENtXlLWWdShVk25mnOM/v7ajx0owwYzJuVxu "Ruby – Try It Online")
[Answer]
# [R](https://www.r-project.org/), 58 bytes
```
function(x)x[order(mapply(chartr,"-0-9","dkfjicbhgae",x))]
```
[Try it online!](https://tio.run/##bZDBboMwDIbvewqLHkikRIJSKiFNfRHEgUIysq5JlcJG@/I0DkRlVQ9J7Nj@ftt2kvDJJznopldGk5GOpbGtsORcXy4/N9J0te0ti3jCi4hF7Ul@q@bYfdUiYiOl1SRJQ1IGWwYZpRvgByBlbLSIGcT9n/FPZ4WIK4rB0uVmLr36wELuvIQB1j@Lz0oPV1gQd2E9Y0VcQFg7CycBljjWLmdQ7N/QAFEQeNIMFqT69VStXPiqxoBGxkwr9jM7RTEnlWZ4dnjl/8YN/aK5jO1NP/raAVR@@cE2wnrSIJIHJber6QE "R – Try It Online")
Input is a list of numbers which is implicitly converted as string using `chartr`. `order` then uses lexigographic order to retrieve the order by which the original list should be sorted.
[Answer]
# [Java (JDK 10)](http://jdk.java.net/), 123 bytes
```
l->l.sort(java.util.Comparator.comparing(n->{var r="";for(var c:(""+n).split(""))r+=11+"54-9176320".indexOf(c);return r;}))
```
[Try it online!](https://tio.run/##dZHJbsIwEIbvPMXIJ7skFmErEBKp4lSpVQ8cqx5c4yDTxI5sBxVVPHtqh660HLzMfL9n847tWbzbvLSyqrVxsPM2bZws6VXa@@MrGsWd1CpAXjJr4Z5JBW89gLp5LiUH65jzx17LDVSe4bUzUm0fn4CZrSWdFGCllW0qYZZ30rrlrXJiK0yeQwFZW8Z5Sa3Pi7/zrnRVM8OcNpR3Vx8Sqzh/2zMDJkMoLbTBweALjFBfEWrrUjp/J8T0syTpo8k4nifX09FwgKhUG/H6UGBOUiNcYxSY9EhIm3bVdUWdVeaEdRYyuDGGHSxlNnDcyeHMmUQwjGBEon9p7PEggiC6qBh4wXgSwXx6QZL454lPkozCGodtcinaLIIZ6RA5tRdG9au7rrnFqcXPHwJYH6wTFdWNo7Wft8OBQx/QAtBHJB@LMs5FfYJf3vOnpfrJj72wju07 "Java (JDK 10) – Try It Online")
This is a naive Java implementation. Should be much golfable.
## Credits
* 3 bytes saved thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)
[Answer]
# [JavaScript (SpiderMonkey)](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/45), ~~87~~ 73 bytes
```
a=>a.sort((p,q,F=b=>[...""+b].map(x=>"54-9176320".search(x)))=>F(p)>F(q))
```
[Try it online!](https://tio.run/##dY1NDsIgGET3HqMriPMRKNDaGLr0EsYF1vqvYDFGT1/ZuDGazMzmJW@O/uFTNxzinVI8bPrhEq6n/jVu3ehd60UKw52xiBsWbu3apRCiKKbrlbj4yJ6uLayhRtWVLmUhUu@Hbs@enHPXLljkeW6cj/MuXFM49@IcdmzLlgol9IrzyTcgBYlMfzMpYSya6hdVCqqE0jkm1/4xgBrQDFSDKpAFGZAGlfg8Q8PAokKNGRoomUXjGw "JavaScript (SpiderMonkey) – Try It Online")
Thanks @Arnauld for telling that the sort in SpiderMonkey is stable, so the `||-(F(q)>F(p))` part can finally be dropped.
[Answer]
# [Red](http://www.red-lang.org), 114 bytes
```
func[n][g: func[a][collect[foreach c form a[keep index? find"854-9176320"c]]]sort/compare n func[x y][(g x)< g y]]
```
[Try it online!](https://tio.run/##VYzNCsIwEITvPsXQkx6KSf@0RfAdvIY9lHRTi21SYoX69DEoiMIO8813WM9duHCnaGOaYB5WK0uqb/DGlpR248h6UcZ5bvUVGpEmtOrGPGOwHa9nmNjJsSzSWh6qPBOJJqK788teu2luPcN@Hq54ktr2WHcn9JEpzH6wCwyURIacNt@dSghE@aeEQFGirn6klJAZZB6viCkpvAA "Red – Try It Online")
## More readable:
```
f: func [ n ] [
    g: func [ a ] [
        collect [
            foreach c form a [
                keep index? find "854-9176320" c
            ]
        ]
    ]
    sort/compare n func [ x y ] [ (g x) < g y ]
]
```
[Answer]
# C++, 353 bytes
This is kind of a comedy entry, but I was wasting time and wrote it, so I can't not post it... Enjoy a chuckle, and let me know if there are any space-savers I missed!
```
#include<algorithm>
#include<iostream>
#include<iterator>
#include<numeric>
#include<string>
using namespace std;auto f(int i){auto s=to_string(i);for(auto&c:s)c='A'+"854-9176320"s.find(c);return s;}int main(){int a[100];auto b=begin(a);auto e=end(a);iota(b,e,-50);sort(b,e,[](int l,int r){return f(l)<f(r);});copy(b,e,ostream_iterator<int>(cout," "));}
```
Output:
>
> 8 5 4 48 45 44 49 41 47 46 43 42 40 -8 -5 -50 -4 -48 -45 -44 -49 -41 -47 -46 -43 -42 -40 -9 -1 -18 -15 -14 -19 -11 -17 -16 -13 -12 -10 -7 -6 -3 -38 -35 -34 -39 -31 -37 -36 -33 -32 -30 -2 -28 -25 -24 -29 -21 -27 -26 -23 -22 -20 9 1 18 15 14 19 11 17 16 13 12 10 7 6 3 38 35 34 39 31 37 36 33 32 30 2 28 25 24 29 21 27 26 23 22 20 0
>
>
>
[Answer]
# Mathematica, 68 bytes
```
SortBy[If[# < 0,"m ",""]<>StringRiffle@IntegerName@IntegerDigits@#&]
```
Function. Takes a list of integers as input and returns the sorted list as output. Just separates the digits of each number with `IntegerDigits`, converts each digit to `"zero"`, `"one"`, etc., with `IntegerName`, converts the list into a space-separated string with `StringRiffle`, prepends an `"m "` if the number is negative, and sorts based on this string. Indeed, this was the shortest approach I can find, since Mathematica only natively uses lexicographic sorting for lists of the same length; thus, an approach based on `854-9176320` ends up taking more bytes since string functions are so expensive.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~15~~ ~~14~~ 13 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
Σ•t∍ýJ•(ÁÁsSk
```
-1 byte thanks to *@Emigna*.
-1 byte thanks to *@ovs*.
[Try it online](https://tio.run/##yy9OTMpM/f//3OJHDYtKHnX0Ht7rBWRpHG483FgcnP3/f7ShoY6hkY6hMRCZALFpLAA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfeX/c4sfNSwqedTRe3ivF5ClcbjxcGNxcPb/Wp3/0dGGOkY6xrE6CtG6hjoGOkAehG1goGNiqmNpBuIZGuoYGukYGgORCRCbxsYCAA).
**Explanation:**
```
Σ              # Sort by:
 •t∍ýJ•        #  Push compressed integer 917632054
       (       #  Negate it: -917632054
        ÁÁ     #  Rotate it twice towards the right: "54-9176320"
          s    #  Swap so the current number to sort is at the top of the stack
           S   #  Convert it to a list of characters
            k  #  Check for each its index in the string (resulting in -1 for '8')
```
[See this 05AB1E tip of mine (section *How to compress large integers*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `•t∍ýJ•` is `917632054`.
[Answer]
# [Nim](http://nim-lang.org/), 110 109 105 103 bytes
```
import algorithm,sequtils,strutils
func p[S](n:S):S=n.sortedByIt join mapIt($it,$"54-9176320".find(it))
```
[Try it online!](https://tio.run/##Vcw7C4NADAfw3U8RxEEhiuezCoXSzdlRHMRHveI96p1DP709Swc7JITfPwmnbN8pk2LV0C0PsVI9M1Tja9N0Uaj0@h2saeM9yKZuXV7WXllfeaDMzTjc35WGp6AcWCcr7TpUo2OniV@QPIuj0A4mygeXas/bx34WcGsIQoQQt4G0fuIbChGO4E9Dg0mKUGQnJmaNmAckPio5WnqKc4SLuTCyfwA "Nim – Try It Online")
For some reason, Nim can't compare `seq`s, so I had to turn the results into a string, which cost quite a lot of bytes.
]


[Question]
      [
Given a word, treat every letter as its number in English alphabet (so `a` becomes 1, `b` becomes 2, `z` becomes 26 and so on), and check if all of them, including duplicates, are pairwise [coprime](https://en.wikipedia.org/wiki/Coprime_integers).
The input is exactly one word of lowercase English letters. The output is the fact if the word is coprime: any truthy/falsey values, but only two variants of them. Standard loopholes are forbidden.
Test cases:
* `man`: `True`
* `day`: `True` (thanks to Ørjan Johansen)
* `led`: `False` (`l=12` and `d=4` have `gcd=4`)
* `mana`: `True` (though `a` occurs multiple times, 1 and 1 are coprimes)
* `mom`: `False` (`gcd(13,13)=13)`)
* `of`: `False` (thanks to xnor; though `15∤6`, `gcd(15,6)=3`)
* `a`: `True` (if no pairs of letters, treat the word as coprime too)
This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code in bytes wins!

[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 36 bytes
```
CoprimeQ@@LetterNumber@Characters@#&
```
[Try it online!](https://tio.run/##FYdNDkAwEEbvUomVK0ia2CKsxeLDSJsYZIyV6NWrNu@HoY4Y6mfEtYzVcYpn6q2tSZWkvXkisZWDYE5/2SyPnfhdhzU0OMNjGLspzEZLYmr8OjgR5h3jBw "Wolfram Language (Mathematica) – Try It Online")
---
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 33 bytes
* Thanks to [Misha Lavrov](https://codegolf.stackexchange.com/users/74672/misha-lavrov) for this three bytes shorter version.
```
CoprimeQ@@(ToCharacterCode@#-96)&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b73zm/oCgzNzXQwUEjJN85I7EoMbkktcg5PyXVQVnX0kxT7X9AUWZeSXRanW9iQV21Um5inpKOUk5qCpAEshNBVH4ukExUqo39DwA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
```
ØaiⱮgþ`P$Ƒ
```
[Try it online!](https://tio.run/##y0rNyan8///wjMTMRxvXpR/elxCgcmzi/4e7tygcbn/UtEYh8v//3MQ8rpzUFC4gnciVm5/LlQgA "Jelly – Try It Online")
### How it works
```
ØaiⱮgþ`P$Ƒ  Main link. Argument: s (string)
Øa          Yield "abc...xyz".
  iⱮ        Find the 1-based index of each c of s in "abc...xyz".
        $Ƒ  Call the monadic chain to the left.
            Yield 1 if the result is equal to the argument, 0 if not.
    gþ`       Take the GCDs of all pairs of indices, yielding a matrix.
       P      Take the columnwise product.
            For coprimes, the column corresponding to each index will contain the
            index itself (GCD with itself) and several 1's (GCD with other indices),
            so the product is equal to the index.
```
[Answer]
# [Haskell](https://www.haskell.org/), 48 bytes
```
((==).product<*>foldr1 lcm).map((-96+).fromEnum)
```
[Try it online!](https://tio.run/##JYy7DkIhEAX7@xWGCtRLYmNiInaWfoEas4GLEndhw@P3RYzNnGnOvKC8F8Tuza1LaYzSnJNrth7XJ5/Q5d0KLSlNwFLOh/1GaZ8TnWMj1UPkVou5CoIotgIXNzgcfpNoEMR9mghCNCNweUjOIVbt1f/ZP9YjPEufLfMX "Haskell – Try It Online")
Very straightforward: converts the string to a list of numbers and then checks whether the product is equal to the LCM.
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 9 bytes
```
{Ism{PhxG
```
[Test suite](http://pyth.herokuapp.com/?code=%7BIsm%7BPhxG&test_suite=1&test_suite_input=%22man%22%0A%22day%22%0A%22led%22%0A%22mana%22%0A%22mom%22%0A%22of%22%0A%22a%22&debug=0)
Explanation:
```
{Ism{PhxG   | Full code
{Ism{PhxGdQ | With implicit variables filled
------------+------------------------------------------
   m      Q | For each char d in the input:
    {P      |  list the unique prime factors of
      hx d  |  the 1-based index of d in
        G   |  the lowercase alphabet
  s         | Group all prime factors into one list
{I          | Output whether the list has no duplicates
```
did Pyth just outgolf Jelly?
[Answer]
# Python 2 - ~~122~~ 118 bytes
*-4 bytes thanks to @JonathanAllan*
This is honestly terrible, but I've spent way too long to not post this.
```
from fractions import*
def f(n):r=reduce;n=[ord(i)-96for i in n];return r(lambda x,y:x*y/gcd(x,y),n)==r(int.__mul__,n)
```
[Try it Online](https://tio.run/##DchLCsMgEADQfU8xu4whbaGLQhM8SSli/LRCHGWiEE9vs3u83Mov0aN3zymCZ21KSLRDiDlxGS/WefBIYmbJzlbjFpLvxBaDuL6ePjEECAT0WdiVygSMm46r1XBMbT7Gdv8ai6fFREJKxkDlplSsm1Ln9MxnoMdBr2YQov8B)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 11 bytes
```
Ç96-2.Æ€¿PΘ
```
[Try it online!](https://tio.run/##yy9OTMpM/V9TVvn/cLulma6R3uG2R01rDu0PODfjv87/3MQ8rpzUFC4gnciVm5/LlciVn8aVklgJAA "05AB1E – Try It Online")
**Explanation**
```
Ç96-         # convert to character codes and subtract 96
    2.Æ      # get all combinations of size 2
       €¿    # gcd of each pair
         P   # product of gcds
          Θ  # is true
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 11 bytes
```
ạ{-₉₆ḋd}ᵐc≠
```
[Try it online!](https://tio.run/##ASsA1P9icmFjaHlsb2cy///huqF7LeKCieKChuG4i2R94bWQY@KJoP//Im1hbmEi "Brachylog – Try It Online")
## Explanation
```
ạ{-₉₆ḋd}ᵐc≠
ạ              Split the input into its character codes
 {     }ᵐ      For each one
  -₉₆          Subtract 96 (a -> 1, b -> 2 etc.)
     ḋd        And find the unique (d) prime factors (ḋ)
         c     Combine them into one list
          ≠    And assert they are all different
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~77~~ ~~68~~ 64 bytes
```
lambda a:all(sum(ord(v)%96%i<1for v in a)<2for i in range(2,26))
```
[Try it online!](https://tio.run/##HchBCsIwEEDRtZ5iNiUzkI1ZFCz1JOpiJI0GkklJasHTR8fV5/31s72KuB4ut544PzwDT5wStnfGUj3uNJzHIc6nUCrsEAWYZqeIisryXNBZNxJ1vU3v1WQWY8GkxWt@4n9L1rC5T8fDWqNs0CwEbNS/ "Python 2 – Try It Online")
Basically, (some pair in the input is not co-prime) if and only if (there is a number i > 1 which divides more than one of the inputs).
[Answer]
# [Python 3](https://docs.python.org/3/), ~~61~~ 59 bytes
Using python bytes as argument:
```
lambda s:all(sum(c%96%x<1for c in s)<2for x in range(2,24))
```
The last divisor to check is 23, the largest prime below 26.
[Try it online!](https://tio.run/##JYzLDoMgEEX3/YrZGCBxU9o0qdEv0S4GhdaEh4Fpol9Pha7OPYt7toM@wd@yGaZs0akFIXVoLU9fx@fm@Wj2/mpChBlWD0n0ssheJKJ/ay5beRcik06UYIBRMYeetaCY1Uvl6fgfwVUie11KhUqlHjvY4uqJG05n6wc "Python 3 – Try It Online")
Thanks to @Dennis for saving two bytes.
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 60 bytes
```
f=(s,v=23)=>n=v<2||f(s,v-1)&&Buffer(s).every(c=>c%32%v||n--)
```
[Try it online!](https://tio.run/##bcpBCsIwEADAu/9omwVTMD1qevAnId0VJd1IogtC/p5Wj5LrMA8nLvt0f740xwVrJavyUayZwM5s5WJKoa/oE/T99U2ESWUYUTB9lLez7ybTSSmsNVQfOceAY4g3RWpYHQ8A58MfB1xavG/X9Li2@HfrBg "JavaScript (Node.js) – Try It Online")
* Using the idea of `Buffer` from [Shieru Asakoto](https://codegolf.stackexchange.com/users/71546/shieru-asakoto)'s [post](https://codegolf.stackexchange.com/a/172876/44718).
* Thanks to [Arnauld](https://codegolf.stackexchange.com/users/58563/arnauld), saved 5 bytes.
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~34~~ 32 bytes
*-2 bytes thanks to nwellnhof*
```
{[lcm](@_)==[*] @_}o{.ords X-96}
```
[Try it online!](https://tio.run/##Hce9CoAgFAbQuZ7i4xJRUY1Bg9BjBCEimZNm2BRir24/0@EcmzdDshdKDYYUFrNaXk2iZmxpOCYRXeidVyfmbhxi0s6DrNypBZlNfbyTv85@SELIs1NeoEKA7r7UeUwP "Perl 6 – Try It Online")
An anonymous codeblock that takes a string and returns True or False. If the lowest common multiple of the letters is equal to the product of the letters than they share no common divisors.
### Explanation:
```
                     {.ords X-96}  # Convert the letters to a list of numbers
 {                 }o              # Pass result to the next codeblock
  [lcm](@_)           # The list reduced by the lcm
           ==         # Is equal to?
             [*] @_   # The list reduced by multiplication
```
[Answer]
# J, 36 bytes
```
[:(1 =[:*/-.@=@i.@##&,+./~)_96+a.&i.
```
## Ungolfed
```
[: (1 = [: */ -.@=@i.@# #&, +./~) _96 + a.&i.
```
## Explanation
```
[: (                            ) _96 + a.&i.  NB. apply fn in parens to result of right
                                  _96 + a.&i.  NB. index within J's ascii alphabet, minus 96.
                                               NB. gives index within english alphabet
   (1 =                         )              NB. does 1 equal...
   (    [: */                   )              NB. the product of...
   (                    #&,     )              NB. Flatten the left and right args, and then copy
   (                        +./~)              NB. right arg = a table of cross product GCDs
   (          -.@=@i.@#         )              NB. the complement of the identity matrix.
                                               NB. this removes the diagonal.
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/o600DBVso6209HX1HGwdMvUclJXVdLT19Os04y3NtBP11DL1/mtypSZn5CsAFSqkKajnJuapowskoorAuAZQBfm5qAI5qSnqXEDwHwA "J – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 bytes
```
ŒcO_96g/€ỊẠ
```
[Try it online!](https://tio.run/##y0rNyan8///opGT/eEuzdP1HTWse7u56uGvB////cxPzEgE "Jelly – Try It Online")
* Thanks to Dennis for NOTing my booleans
---
```
ŒcO_96g/€ỊẠ
Œc           All pairs of characters without replacement
  O          Code point of each character
   _96       Subtract 96. a->1, b->2, etc.
        €    For each pair:
      g/       Get the greatest common denominator
         Ị   abs(z)<=1? If they are all 1 then this will give a list of 1s
          Ạ  "All". Gives 1 if they are coprime, 0 if not.
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 10 bytes
```
96-YF&fdA&
```
Outputs `1` for coprime, `0` otherwise.
[Try it online!](https://tio.run/##y00syfn/39JMN9JNLS3FUe3/f/XcxDx1AA) Or [verify all test cases](https://tio.run/##y00syfmf8N/STDfSTS0txVHtf4RLVEXIf/XcxDx1LvWUxEogmZOaAiSBIokgKj8XSOanAYlEdQA).
### Explanation
Consider input `'man'` for example.
```
96-  % Implicit input: string. Subtract 96 from (the codepoint of) each element
     % STACK: [13 1 14]
YF   % Exponents of prime factoriation. Each number produces a row in the result
     % STACK: [0 0 0 0 0 1;
               0 0 0 0 0 0;
               1 0 0 1 0 0]
&f   % Two-output find: pushes row and column indices of nonzeros
     % STACK: [3; 3; 1], [1; 4; 6]
d    % Consecutive differences
     % STACK: [3; 3; 1], [3; 2]
A    % All: gives true if the array doesn't contain zeros
     % STACK: [3; 3; 1], 1
&    % Alternative in/out specification: the next function, which is implicit
     % display, will only take 1 input. So only the top of the stack is shown
```
[Answer]
# Markov algorithm, as interpreted by [eMain](https://freeshell.de//~jcm/projects/live/emain/em-interpreter.html) (~~474~~ ~~484~~ 463 bytes, ~~76~~ ~~78~~ 76 rules)
```
a->
d->b
f->bc
h->b
i->c
j->be
l->bc
n->bg
o->ce
p->b
q->q
r->bc
t->be
u->cg
v->bk
x->bc
y->e
z->bm
cb->bc
eb->be
gb->bg
kb->bk
mb->bm
qb->bq
sb->bs
wb->bw
ec->ce
gc->cg
kc->ck
mc->cm
qc->cq
sc->cs
wc->cw
ge->eg
ke->ek
me->em
qe->eq
se->es
we->ew
kg->gk
mg->gm
qg->gq
sg->gs
wg->gw
mk->km
qk->kq
sk->ks
wk->kw
qm->mq
sm->ms
wm->mw
sq->qs
wq->qw
ws->sw
bb->F
cc->F
ee->F
gg->F
kk->F
mm->F
qq->F
ss->F
ww->F
b->
c->
e->
g->
k->
m->
q->
s->
w->
FF->F
TF->F
!->.
->!T
```
The first 17 rules factor the "composite letters" into their "prime letter" factors, ignoring multiplicity. (E.g., `t` becomes `be` because 20 factors as a product of a power of 2 and a power of 5.)
The next 36 rules (such as `cb->bc`) sort the resulting prime factors.
The next 9 rules (such as `bb->F`) replace a repeated prime factor by `F`, then 9 more rules (such as `b->`) get rid of the remaining single letters.
At this point, we either have an empty string, or a string of one or more `F`s, and the last rule `->!T` adds a `!T` at the beginning. Then the rules `FF->F` and `TF->F` simplify the result to either `!T` or `!F`. At this point, the `!->.` rule applies, telling us to get rid of `!` and halt: returning `T` for a coprime word, and `F` otherwise.
(Thanks to bodqhrohro for pointing out a bug in the earlier version that caused this code to give an empty string on input `a`.)
[Answer]
# [Python 3](https://docs.python.org/3/), ~~90~~ 89 bytes
*-1 byte by numbermaniac*
```
f=lambda q,*s:s==()or all(math.gcd(ord(q)-96,ord(w)-96)<2for w in s)and f(*s)
import math
```
[Try it online!](https://tio.run/##HYzNCsIwEITvfYq9JVuqBwXBYp5EPKymsYH8tMlC8eljt6dvBma@5cdzTtfWnAkU35ZgHfo6VmM05gIUgo7E8/n7sToXq1c83W@DpE0SPi5un23gE1SkZMHpvmLn45ILg1wbT5UrGHiqSEkNoMJkBXujgzkKSL06cbG4js8IS/GJ9a5kxPYH "Python 3 – Try It Online")
Use as `f(*'man')`.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 45 bytes
```
;
{`\w
#$&
}T`l`_l
M`;(##+)\1*;(#*;)*\1+;
^0
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7wn8uaqzohppxLWUWNqzYkISchPofLN8FaQ1lZWzPGUAvI0LLW1Iox1LbmijP4/z83MY8rJzWFC0gncuXm53IlAgA "Retina 0.8.2 – Try It Online") Explanation:
```
;
```
Insert separators between each letter and at the start and end.
```
{`\w
#$&
```
Prepend a `#` to each letter.
```
}T`l`_l
```
Move each letter 1 back in the alphabet, deleting the `a`s. Then repeat the above operations until all the letters have been deleted. This converts each letter to its 1-based alphabet index in unary.
```
M`;(##+)\1*;(#*;)*\1+;
```
Test whether any two values share a common factor greater than 1. (This can find more than one pair of letters with a common factor, e.g. in the word `yearling`.)
```
^0
```
Check that no common factors were found.
[Answer]
# R + pracma library, 75 bytes
`function(w){s=utf8ToInt(w)-96;all(apply(outer(s,s,pracma::gcd),1,prod)==s)}`
I'm using the `gcd` function in the `pracma` library as to my knowledge R does not have a built-in for that. I'm using the approach of comparing the product of the gcds to the numbers themselves.
## 65 bytes (credit: @J.Doe)
`function(w)prod(outer(s<-utf8ToInt(w)-96,s,pracma::gcd))==prod(s)`
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 14 bytes
```
;à2 e_®nR+CÃrj
```
[Try it online!](https://ethproductions.github.io/japt/?v=1.4.6&code=O+AyIGVfrm5SK0PDcmo=&input=LW0gWwpbJ20nLCdhJywnbiddLApbJ2wnLCdlJywnZCddLApbJ20nLCdhJywnbicsJ2EnXSwKWydtJywnbycsJ20nXSwKWydhJ10KXQ==)
Takes input as an array of characters.
### How it works
```
;à2 e_m_nR+C} rj
;                 Use alternative predefined variables (in this case, C = "a-z")
 à2               Get all pairs
    e_            Does all pairs satisfy that...
      m_            when the character pair is mapped over...
        nR+C}         conversion from "a-z" to [1..26]
              rj    then the two numbers are coprime?
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 56 bytes
```
->s{s.bytes.combination(2).all?{|a,b|2>(a-96).gcd(a-b)}}
```
[Try it online!](https://tio.run/##KypNqvyfZhvzX9euuLpYL6myJLVYLzk/NykzL7EkMz9Pw0hTLzEnx766JlEnqcbITiNR19JMUy89OQXIStKsrf0frZ6bmKeuo6Cek5oCooC8RDCdnwuiIOwq9Vi93MSC6pqKmgKFtOiK2Nr/AA "Ruby – Try It Online")
[Answer]
# Java 10, 86 bytes
```
a->{var r=1>0;for(int i=1,s=0;++i<24;r&=s<2,s=0)for(var c:a)s+=c%96%i<1?1:0;return r;}
```
Port of [*@Vincent*'s Python 3 answer](https://codegolf.stackexchange.com/a/172872/52210).
[Try it online.](https://tio.run/##ZZBBasMwEEX3OcVgSJFxY@xQCo2slNJ1s8mydDGR5VapLQVJNpjgbQ/QI/Yiruy4C6cbgd7/zDzmiA2ujvlnz0u0Fl5QqvMCQConTIFcwG74Ahy0LgUq4IR/oHl9AwypD7qFf6xDJznsQAHrcbU9N2jAsHSb0EIb4meBZOmtZQmNIpmt76i5YTZbDyQcGkOfbzC0EePLh/ulzNLHdJNQI1xtFBja9XRYdKoPpV807Wu0zKHywmTvjFTvo9TF1gnrSFChCkbLP1CKfA58A6@IrubgKs@xnQNdBP8uMZqN8cUM7OS1b60TVaxrF5984EpFbBTAz9c3BJGKObGx08/@wE/GYEvCcBrd9b8)
**Explanation:**
```
a->{                 // Method with character-array parameter and boolean return-type
  var r=1>0;         //  Result-boolean, starting at true
  for(int s=0,       //  Sum integer, starting at 0
      i=1;++i<24     //  Loop `i` in the range (1, 24)
      ;              //    After every iteration:
       r&=s<2,       //     If the sum is >= 2: change the result to false
       s=0)          //     And reset the sum to 0
     for(var c:a)    //   Inner loop over the input-characters
       s+=c%96%i<1?  //    If the current character modulo-96 is divisible by `i`
           1         //     Increase the sum by 1
          :          //    Else
           0;        //     Leave the sum the same
  return r;}         //  Return the result-boolean
```
[Answer]
# Japt, 13 bytes
Takes input as a character array.
```
®c uHÃà2 e_rj
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.6&code=rmMgdUjD4DIgZV9yag==&input=WyJtIiwiYSIsIm4iXQ==) or [verify all test cases](https://ethproductions.github.io/japt/?v=1.4.6&code=rAquYyB1SMPgMiBlX3Jq&input=WwoibWFuIgoiZGF5IgoibGVkIgoibWFuYSIKIm1vbSIKIm9mIgoiYSIKXQotbVI=)
[Answer]
# [Pyt](https://github.com/mudkip201/pyt), ~~23~~ 18 bytes
```
ą1Ĩ6²-⁺ϼƑ⁻ž⁺ĐỤŁ⇹Ł=
```
[Try it online!](https://tio.run/##AS0A0v9weXT//8SFMcSoNsKyLeKBus@8xpHigbvFvuKBusSQ4bukxYHih7nFgT3//2E "Pyt – Try It Online")
```
ą                     implicit input (string); convert to array of characters
 1Ĩ6²-⁺               use bug in arbitrary-base radix interpretation code to
                      convert lowercase letters to integers
       ϼ              get unique prime factors for each number
        Ƒ             flatten array
         ⁻ž⁺          remove all 1s
            ĐỤŁ⇹Ł=    is the resulting list the same length as the list of its
                      unique elements?; implicit print
```
#### Original Approach (23 bytes)
```
ą1Ĩ6²-⁺ĐĐɐǤƑ⁻⇹ŁřĐɐ≠Ƒ*↑¬
```
[Try it online!](https://tio.run/##ATkAxv9weXT//8SFMcSoNsKyLeKBusSQxJDJkMekxpHigbvih7nFgcWZxJDJkOKJoMaRKuKGkcKs//9tb20 "Pyt – Try It Online")
```
ą                              implicit input (string); convert to array of characters
 1Ĩ6²-⁺                        abuses bug in arbitrary-base radix interpretation code to
                               convert lowercase letters to integers
       Đ                       duplicate top of stack
        ĐɐǤ                    get all GCD pairs
           Ƒ⁻                  flatten array, and decrement each element
             ⇹                 swap top two items on stack
              ŁřĐɐ≠Ƒ           creates matrix of all 1s except for the main diagonal,
                               which contains only 0s; then flattens that array
                    *↑¬        multiplies element-wise the two arrays, gets the max, and
                               logically negates that value
```
Outputs "True" if coprime, "False" if not
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 9 bytes
```
øA2ḋvġΠċ¬
```
[Try it Online (with test cases)](https://vyxal.pythonanywhere.com/#WyJBIiwiIiwiw7hBMuG4i3bEoc6gxIvCrCIsIiIsIm1hblxuZGF5XG5sZWRcbm1hbmFcbm1vbVxub2ZcbmEiXQ==)
```
øA        # convert letters to index in alphabet
  2ḋ      # get all combinations of length 2
    vġ    # get the gcd of each
      Π   # get the product of this list
       ċ  # inequality to 1
        ¬ # logical not
```
Probably golfable.
[Answer]
# q, 121 111 bytes
```
{$[1=count x;1b;1b=distinct{r:{l:{$[0~y;:x;.z.s[y;x mod y]]}[y;]'[x];2>count l where l<>1}[x;]'[x]}[1+.Q.a?x]]}
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~87~~ 82 bytes
```
a=>!/\b(11+)\1* (1+ )*\1+\b/.exec(Buffer(a).map(x=>w+=" ".padEnd(x-95,1),w="")&&w)
```
[Try it online!](https://tio.run/##bcoxDoIwFADQ3VPUDuR/CiUdHIgpg4m36PKhrdFAS0Clt6@6GtaX96A3rcNyn591iNZlrzPp7tiYHpQSaFTJQAmGpVHC9I10yQ1weXnvFiCUE82QdLcJzRmXM9lrsJDq9lQprDbNORbFhvk8xLDG0ckx3sADnyhwxMM/j87u8XfTrsdpj383fwA "JavaScript (Node.js) – Try It Online")
### Original approach (87B)
```
a=>!(b=Buffer(a)).some((x,i)=>b.some((y,j)=>i-j&&(g=(p,q)=>q?g(q,p%q):p)(x-96,y-96)>1))
```
[Try it online!](https://tio.run/##bcrdCsIgGMbx8@6iQeN9QQedBBUadCduU1E2P@aK7erNoKPw5IH/j8eKt0jDYsJKnR9lViwLxo/Qs@dLKbmAQOySnyXARgwy3v9qJ7aUobZtQTMIJJaMDw2RhFPEW0DY6PVC9jLIz4j5PniX/CS7yWtQ0MzCNYiHf57kWOPyFlX3c42/3/wB "JavaScript (Node.js) – Try It Online")
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 16 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
è'B╕i4à!ùà╫æor4Z
```
[Run and debug it](https://staxlang.xyz/#p=8a2742b8693485219785d7916f72345a&i=man%0Aday%0Aled%0Amana%0Amom%0Aof%0Aa&m=2)
**Explanation**
```
2S{M{$e96-mm{E:!m|A     #Full program, unpacked, implicit input
2S                      #Generate all combinations of size 2
  {       m             #Map for each element
   M                    #Split into size of 1 element
    {       m           #Map for each element
     $e                 #Convert to number
       96-              #Subtract 96
           {    m       #Map for each element
            E:!         #Explode array onto stack, are they coprime
                 |A     #Are all elements of array truthy
```
Outputs 1 for True, 0 For false.
There is probably a better way to do the converting to number part, but it works.
[Answer]
# APL(NARS), 16 chars, 32 bytes
```
{(×/p)=∧/p←⎕a⍳⍵}
```
This use method other used that LCM()=×/, it is fast but overflow if input array is enough long;
other alternative solutions a little slower:
```
{1=×/y∨y÷⍨×/y←⎕a⍳⍵}
{1=≢,⍵:1⋄1=×/{(2⌷⍵)∨1⌷⍵}¨{x←97-⍨⎕AV⍳⍵⋄(,x∘.,x)∼⍦x,¨x}⍵}
```
this below it seems 10 times faster(or+) than just above functions
```
∇r←h m;i;j;k;v
   r←i←1⋄k←≢v←97-⍨⎕AV⍳m
A: →F×⍳i>k⋄j←i+1⋄→C
B:   →E×⍳1≠(j⌷v)∨i⌷v⋄j←j+1
C:   →B×⍳j≤k
D: i←i+1⋄→A
E: r←0
F:
∇
```
i prefer this last because it is easier, faster, trusted (becaise less overflow possiblity), easier to write, and how it has to be (even if it has some bytes more...)
[Answer]
# [Thunno](https://github.com/Thunno/Thunno), \$ 13 \log\_{256}(96) \approx \$ 10.70 bytes
```
O96-2zQ.AgP1=
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72sJKM0Ly9_wYKlpSVpuhZr_S3NdI2qAvUc0wMMbSFiUKkFi3MT8yBMAA)
Port of Emigna's 05AB1E answer.
#### Explanation
```
O96-2zQ.AgP1=  # Implicit input
O              # Ordinal of each character in the input
 96-           # Subtract 96 from each
    2zQ        # Combinations of length 2
       .Ag     # GCD of each pair
          P    # Product of this list
           1=  # Equals 1?
               # Implicit output
```
]


[Question]
      [
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.

---
 Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 5 years ago.
[Improve this question](/posts/172809/edit)
Awhile back I encountered a simple programming puzzle to determine whether a string was a [pangram](https://en.wikipedia.org/wiki/Pangram), or a perfect pangram. (Although it's worth noting that this particular challenge gave a different meaning than the standard definition of a "perfect pangram," to mean any sentence where every letter appears *n* times for some positive *n*). And it was a fun challenge. But recently it got me wondering whether it would be possible to solve this challenge purely with regular expressions. If it is, I expect it will be a pretty gnarly regex. But I'm not even sure it is possible.
Still, if anyone is able to do it, it would be the folks here at Code Golf. So here's the challenge:
Write a regular expression which can determine whether or not a given string is a pangram. You can assume that all non-alpha characters have already been stripped out (or don't, if you really want to challenge yourself), and that everything has been transformed into lowercase.
Bonus challenge: write another regular expression to determine whether the given string is a "perfect pangram" by the definition given above.
Examples of an ordinary pangram:
>
> thequickbrownfoxjumpsoverthelazydog
>
>
>
Example of perfect pangrams:
>
> abcdefghijklmnopqrstuvwxyz
>
>
> jocknymphswaqfdrugvexblitz
>
>
> squdgykilpjobzarfnthcwmvexhmfjordwaltzcinqbuskpyxveg
>
>
>
I'm not really sure if this is even possible just with regex alone. If you find that it is, kudos!

[Answer]
Assuming you're using a flavor of regex that include look-aheads, detecting a pangram is straightforward, but tedious. Using Python syntax:
`r"(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)(?=.*g)(?=.*h)(?=.*i)(?=.*j)(?=.*k)(?=.*l)(?=.*m)(?=.*n)(?=.*o)(?=.*p)(?=.*q)(?=.*r)(?=.*s)(?=.*t)(?=.*u)(?=.*v)(?=.*w)(?=.*x)(?=.*y)(?=.*z).*"`
<https://regex101.com/r/Z7NjEQ/2>
The `(?=.*a)` block tests if what follows after that point matches `.*a`; another way to say that is, is this expression followed by any characters and then an `a`, or just, does this include an `a`? Then repeat that check for every letter of the alphabet.
Without lookaheads, it's still possible, but even more tedious, because you have to account for every possible ordering of the alphabet. If you were limited to the letters `abc`, here's what it might look like:
`r".*(a.*b.*c|a.*c.*b|b.*a.*c|b.*c.*a|c.*a.*b|c.*b.*a).*"`
<https://regex101.com/r/OnXQe7/1/>
This checks for an `a`, any set of characters, a `b`, any set of characters, then a `c`, OR an `a`, any set of characters, a `c`, any set of characters, then a `b`, OR...you get the idea.
You could use the same approach to check for the standard meaning of perfect pangram (every character exactly once), but not the modified version used here.
[Answer]
**Regexp: 45 43 20 19 18 bytes**
```
(?!.*(.).*\1).{26}
```
Assuming the input is [a-z] (lowercase, only alphabets a to z, spaces etc removed)
A byte saved, thanks to Neil
]