[Question]
  [
We will think of a partition as a sequence of non-increasing integers.
For a given partition into \$n\_1, n\_2, \dots, n\_k\$ with \$n\_1 \geq n\_2 \dots n\_{k-1} \geq n\_k = n\$ we write it out with \$n\_i\$ dots on row \$i\$. So for \$6, 1, 1\$ we would write six dots on the first row, one on the second and one on the third
# Task
Given a partition, you should output its [conjugate](https://en.wikipedia.org/wiki/Partition_(number_theory)#Conjugate_and_self-conjugate_partitions). That is you should output how many dots there are in each column of the dot diagram. For the input \$6, 1, 1\$ the output should be \$3, 1, 1, 1, 1, 1\$.
# Examples
```
5, 2, 1 gives output 3, 2, 1, 1, 1
4, 3, 1 gives output 3, 2, 2, 1
4, 2, 2 gives output 3, 3, 1, 1
3, 3, 2 gives output 3, 3, 2
4 gives output 1, 1, 1, 1
```
  
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), 3 [bytes](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn)
```
⊒⌾/
```
Try it [here.](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAg4oqS4oy+LwoK4oCiU2hvdyBGIDXigL8y4oC/MQrigKJTaG93IEYgNOKAvzPigL8xCuKAolNob3cgRiA04oC/MuKAvzIK4oCiU2hvdyBGIDPigL8z4oC/MgpA)
Explanation via example:
```
   / 4‿3‿1         # use each element as a count to replicate its index
⟨ 0 0 0 0 1 1 1 2 ⟩
   ⊒/ 4‿3‿1        # take a running occurrence count
⟨ 0 1 2 3 0 1 2 0 ⟩
   /⁼⊒/ 4‿3‿1      # the inverse of /, applied via ⌾, counts occurrences
⟨ 3 2 2 1 ⟩
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 5 bytes
```
L˜{Åγ
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m73MwDQxyTB1wYKlpSVpuhYrfE7PqT7cem7zkuKk5GKo4ILl0WY6hjqGsRAuAA)
```
L        # range, so [6,1,1] is [[1,2,3,4,5,6],[1],[1]]
˜        # flatten, [1,2,3,4,5,6,1,1]
{        # sort, [1,1,1,2,3,4,5,6]
Åγ       # run length encode, [3, 1, 1, 1, 1, 1]
```
If we can have extraneous zeros in the output, then by porting [@frasiyav's great BQN answer](https://codegolf.stackexchange.com/a/266339/92727) we have:
# [05AB1E](https://github.com/Adriandmen/05AB1E), 4 bytes
```
L˜ā¢
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m73MwDQxyTB1wYKlpSVpuhbLfU7POdJ4aNGS4qTkYqjYguXRZjqGOoaxEC4A)
```
L˜        # same as previously
ā         # length range, [1, 2, 3, ..., len(arr)] (without popping)
¢         # count each
```
[Answer]
# [Octave](https://www.gnu.org/software/octave/) / MATLAB, 17 bytes
```
@(x)sum(1:x<=x,1)
```
Anonymous function that inputs a column vector and outputs a row vector.
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999Bo0KzuDRXw9Cqwsa2QsdQ83@aRrSptYKRtYJhrCYXkGNirWCMzAHKGEE4xmAZIOc/AA "Octave – Try It Online")
### Explanation
```
@(x)              % Define anynomous function of x: column vector
        1:x       % Range from 1 to (first entry of) x. Gives a row vector
           <=x    % Less than/equal to x? Element-wise with broadcast. Gives a matrix
    sum(      ,1) % Sum of each column
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 3 bytes
```
b1S
```
[Try it online!](https://tio.run/##y0rNyan8/z/JMPj/4XZN9///o011FIx0FAxjdRSiTXQUjBFMoKgRiGkMFjWKBQA "Jelly – Try It Online")
For some reason, I almost feel like I've seen this even shorter as part of a different solution...
```
b1     Convert each element of the input to base 1.
  S    Sum across columns.
```
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/wiki/Commands/2649a799300cbf3770e2db37ce177d4a19035a25), 4 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
Å1ζO
```
[Try it online](https://tio.run/##MzBNTDJM/f//cKvhuW3@//9Hm@kY6hjGAgA) or [verify all test cases](https://tio.run/##MzBNTDJM/V9Waa@k8KhtkoKSfeX/w62G57b5/9f5Hx1tpmOoYxirE22qYwSmTXSMobSRjhGQNgbyjWJjAQ).
Doesn't work in the new version of 05AB1E, unless we add `0` or `¾` before the `ζ`.
**Explanation:**
```
Å1    # Convert each value in the (implicit) input-list into a list of that many 1s
  ζ   # Zip/transpose; swapping rows/columns,
      # implicitly using a space " " as filler for unequal length rows
   O  # Sum each inner list, which ignores the spaces in the legacy version of 05AB1E
      # (after which the resulting list is output implicitly)
```
[Answer]
# [R](https://www.r-project.org), 26 bytes
```
\(x)Map(\(z)sum(x>=z),1:x)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuha7YjQqNH0TCzRiNKo0i0tzNSrsbKs0dQytKjQhClanaSRrmOkY6hhqQkUWLIDQAA)
A function taking a vector of integers and returning a list of integers.
[Answer]
# [R](https://www.r-project.org), ~~28~~ 22 bytes
*Edit: -6 bytes thanks to [@Giuseppe](https://codegolf.stackexchange.com/users/67312/giuseppe).*
```
\(x)table(sequence(x))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhbbYjQqNEsSk3JSNYpTC0tT85JTgQKaEMlbjFrFqSV-ibmpxRppGskaZjqGOoaamjoKfqE-PppcKHKmOgpGOgoIWWWF9Myy1GKF_NKSgtISBWOINASh6jTRAckS0GmETRtIHI82Y2y2QcQJaDNC1WOoY4jT5yYwQUiQLVgAoQE)
~~Port of~~ Based on [@Command Master's 05AB1E answer](https://codegolf.stackexchange.com/a/266333/55372).
[Answer]
# [Python](https://www.python.org), ~~52~~ 50 bytes
-2 thanks to @mousetail
```
lambda a:[sum(i<x for x in a)for i in range(a[0])]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3jXISc5NSEhUSraKLS3M1Mm0qFNLyixQqFDLzFBI1QcxMELMoMS89VSMx2iBWMxaq0wckmQiSjI421VEw0lEwjNVRiDbRUTBGMIGiRiCmMVjUKDbWiouzoCgzr0QjUUdBXddOXUchTSNRUxNi5oKVcD0QAQA)
[Answer]
# [J](https://www.jsoftware.com), 7 bytes
```
I.i.@{.
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FNVUtFK8NYM0UrS3V1LiU99TQFWysFdQUdBQMFKyDW1VNwDvJxW1pakqZrsdxTL1PPoVoPwruZqMmVmpyRr2CsYKRgCIa6VgppCqYgLkLGCCZuAuTCxY0R6k1AihDiRhBRMBNi0YIFEBoA)
* `I.` What is the "insert before" index when inserting into the input...
* `i.@{.` Of each of the numbers 0 through n-1, where n is the first input element.
## [J](https://www.jsoftware.com), straightforward alternate, 9 bytes
```
[:+/#"0&1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FNVUtFK8NYM0UrS3V1LiU99TQFWysFdQUdBQMFKyDW1VNwDvJxW1pakqZrsTLaSltfWclAzRDCv5moyZWanJGvYKxgpGAIhrpWCmkKpiAuQsYIJm4C5MLFjRHqTUCKEOJGEFEwE2LRggUQGgA)
[Answer]
# [Python](https://www.python.org), 45 bytes
```
def f(a,j=0):
 for c in-1,*a:a[:c]=c*[j];j+=1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=PYxBCsIwFAX3PcXfmcQETFpBIjlJyOITG2yRNJQoeBY33eidehvTVtwNj5n3-qRnvg5xmt73HMRpFpc2QCDIe3OguoIwjOChi0Jyhhqt9s54Znt37vdG_qJmsbBYMKQ2kjVEMNA-8EaQVpDGLmYiGfJyTWGx6dZO884eOSgO0lW24VD_qWyqUL1uym3-Fw)
Takes a list and modifies it in place.
# [Python](https://www.python.org), 34 bytes
```
lambda a:sum(a[:,1>0]>range(a[0]))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=PYxBCsIwFET3OcXHjQlEaauCFNoDeIWaxRcbLTQ_IU2FnsVNQfROvY3Rirt5b4a5v9wQrpbGhy6Ozz7o1X5atGhOZwTMu95wrHKZlokqPdKljpgoIX7LQ2Oc9QGoN24A7IAc09YDQkNgXU08ETmLWMRmjd7jwOsbthyFYOB8Q4Gj1B-cH8dpWe0kZBJSxaqthM0_RZfFtPm6TM37Nw)
### -4 thanks to @att.
Expects a NumPy array.
Ports @Command Master's pure Python.
[Answer]
# [R](https://www.r-project.org), 30 bytes
```
\(l)rowSums(outer(1:l,l,"<="))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhb7YjRyNIvyy4NLc4s18ktLUos0DK1ydHJ0lGxslTQ1IYpu7krTSNYw0zHUMdTU5AKxTXUUjHQUgDxlhfTMstRiBaDWgtISBWOIOASBVZrogARxqTRCUgbiYlNmjGQahItLmRFYjaGOIdylJlAfLFgAoQE)
Slightly longer compared to [pajonk's](https://codegolf.stackexchange.com/a/266336/67312), based on [this other answer of mine](https://codegolf.stackexchange.com/a/142047/67312).
[Answer]
# [sclin](https://github.com/molarmanful/sclin), 18 bytes
```
1X>b tpose \+/ map
```
[Try it on scline!](https://scline.fly.dev/#H4sIAJ7cP2UCA4s2VTBSMIxVsAYAg8mRlAkAAAA#H4sIAJ7cP2UCAzOMsEtSKCnIL05ViNHWV8hNLAAAO25ryBIAAAA#)
1 repeated by n, transpose, sum each.
[Answer]
# [Uiua](https://uiua.org), 8 [bytes](https://codegolf.stackexchange.com/a/265917/97916)
```
⍘⊚⊐/⊂⊐∵⇡
```
[Try it!](https://uiua.org/pad?src=ZiDihpAg4o2Y4oqa4oqQL-KKguKKkOKIteKHoQoKZiBbNSAyIDFdCmYgWzQgMyAxXQpmIFs0IDIgMl0KZiBbMyAzIDJdCg==)
```
⍘⊚⊐/⊂⊐∵⇡  # [5 2 1]
     ⊐∵⇡  # [⟦0 1 2 3 4⟧ ⟦0 1⟧ ⟦0⟧] range of each
  ⊐/⊂     # [0 1 2 3 4 0 1 0]       join
⍘⊚        # [3 2 1 1 1]             occurrences
```
[Answer]
# [Haskell](https://www.haskell.org), 35 bytes
```
f a=[sum[1|j<-a,i<=j]|i<-[1..a!!0]]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m708I7E4OzUnZ8GCpaUlaboWN5XTFBJto4tLc6MNa7JsdBN1Mm1ss2JrMm10ow319BIVFQ1iYyFKbzGylqQWlyhk5hWUliikVhSkJpekpijYKqTkc3HmpJYo5JeWgGRsFdIgarg4gURwSZFPnoKKQnFGfrmCBkyJLVy_poK2toJSTIkSiAYrgqoBCYMUIiRgWri4chMz86AWg50UbaqjYKSjYBirEG0MYUFQLEzeREfBGFneCE0SJASRNEbTCRFCSBpBQwMWgAA)
-1 byte thanks to [matteo\_c](https://codegolf.stackexchange.com/users/73593/matteo-c)
Basically a port of Command Master's [python answer](https://codegolf.stackexchange.com/a/266335/46901)
[Answer]
# JavaScript (ES6), 44 bytes
```
a=>a.map(g=v=>v&&g(--v,b[v]=-~b[v]),b=[])&&b
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5RLzexQCPdtszWrkxNLV1DV7dMJym6LNZWtw5Eaeok2UbHaqqpJf1Pzs8rzs9J1cvJT9dI04g21VEw0lEwjNXUVNDXVzCG8CCIC02piQ5IHlWpEXZ1IBmEOmPs5kFkUNUZ/QcA "JavaScript (Node.js) – Try It Online")
### Commented
```
a =>              // a[] = input array
a.map(g = v =>    // for each value v in a[], using a recursive
                  // callback function g:
  v &&            //   stop if v = 0
  g(              //   otherwise do a recursive call:
    --v,          //     decrement v
    b[v] = -~b[v] //     increment b[v] (set it to 1 if undefined)
  ),              //   end of recursive call
  b = []          //   start with b = []
) && b            // end of map(); return b[]
```
[Answer]
# [Rust](https://www.rust-lang.org), 58 bytes
```
|a|(0..a[0]).map(move|i|a.iter().filter(|x|i<**x).count())
```
[Attempt This Online!](https://ato.pxeger.com/run?1=ZVDdSsMwFMbL7imiFyUZXZitgnRbH8ObUkqoJxDon006imZP4k0v9KHm03jSKCqDQA7f-f44b-_DqM18vpEtaYRqKSOvqxoMkals6SNU-zGJM7bJysPHaOTm4ZxaYemWc5FvC8Yb0dOmO4JVVnBlYKCMS1W7wU5W7dfrifGqG1tDGfMOn1fBbrVkGNCGHIhVbT-alIQ5ZhURgamHysDTgmj1AoXFUoFTDKBT4lqVGQolXZTcdOURKgzApLpGLWW7VSC0hsGU8HxNUfZri7sTFnDhNMzvIxJH5BZjwzzxs38F8r45dxFJ_nPiC4IDfwjJhYMH_xJitz35i8yz_78A)
Basically a port of Command Master's [python answer](https://codegolf.stackexchange.com/a/266335/46901)
[Answer]
# [Japt](https://github.com/ETHproductions/japt) v2.0a0 [`-Q`](https://codegolf.meta.stackexchange.com/a/14339/), 5 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
*-2 bytes from @AZTECCO*
```
mo yl
```
## [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&flags=LVE&code=bW8geWw&input=WzUsMiwxXQ)
---
# [Japt](https://github.com/ETHproductions/japt) v2.0a0 [`-Q`](https://codegolf.meta.stackexchange.com/a/14339/), 7 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
There must be a shorter way
```
co ü ml
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&flags=LVE&code=Y28g/CBtbA&input=WzUsMiwxXQ)
[Answer]
# [PARI/GP](https://pari.math.u-bordeaux.fr), 37 bytes
```
a->Vecrev(vecsum([x^i-1|i<-a])/(x-1))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m728ILEoMz69YMHiNAXbpaUlaboWN1UTde3CUpOLUss0ylKTi0tzNaIr4jJ1DWsybXQTYzX1NSp0DTU1oYrdEgsKcio1EhV07RQKijLzSoBMJRBHSSFNI1FTU0chOtpUx0jHMBbIMtExhjGMdIxADGOgiFFsLNS0BQsgNAA)
---
# [PARI/GP](https://pari.math.u-bordeaux.fr), 37 bytes
```
a->[vecsum([t>=n|t<-a])|n<-[1..a[1]]]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m728ILEoMz69YMHiNAXbpaUlaboWN1UTde2iy1KTi0tzNaJL7GzzakpsdBNjNWvybHSjDfX0EqMNY2NjoYrdEgsKcio1EhV07RQKijLzSoBMJRBHSSFNI1FTU0chOtpUx0jHMBbIMtExhjGMdIxADGOgiFFsrCbEtAULIDQA)
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 26 bytes
```
Plus@@PadRight[1^Range@#]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n277PyCntNjBISAxJSgzPaMk2jAuKDEvPdVBOVbtf0BRZl6Jgr5Dur5DdbWZjqGOYa1OtamOEZg20TGG0kY6RkDaGMg3qq39/x8A "Wolfram Language (Mathematica) – Try It Online")
-12 bytes from @att
[Answer]
# Google Sheets, ~~92~~ 86 bytes
`=join(",",byrow(map(split(A1,","),lambda(n,sequence(n,1,,))),lambda(r,len(join(,r)))))`
Put the input in as a text string in cell `A1` and the formula in `B1`.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 3 bytes
```
ẋ∩@
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyIiLCIiLCLhuoviiKlAIiwiIiwiWzQsIDIsIDJdIl0=)
```
ẋ    Repeat (each value in list times value)
 ∩   Transpose list
  @  Length of each item in list
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 10 bytes
```
ＩＥ⌈θΣＸ⁰÷ιθ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5sbhEwzexAIgrMnNLczUKNXUUgoF0QH55apGGgY6CZ16JS2ZZZkqqRqaOQqEmGFj//x8dbaqjYKSjYBgb@1@3LAcA "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
   θ        Input list
  ⌈         Maximum
 Ｅ          Map over implicit range
      ⁰     Literal integer `0`
     Ｘ      Vectorised raise to power
        ι   Current value
       ÷    Vectorised integer divided by
         θ  Input list
    Σ       Take the sum
Ｉ           Cast to string
            Implicitly print
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 44 bytes
```
\d+
$*_
\G_(?<=(?=(\2_*,?)+)(_+))
$#1,
\D+$
```
[Try it online!](https://tio.run/##K0otycxL/K@qkaDA9T8mRZtLRSueK8Y9XsPexlbD3lYjxiheS8deU1tTI15bU5NLRdlQhyvGRVuF678Ol47Cf1MdBSMdBUMuEx0FYygN5BtxGYP5RgA "Retina 0.8.2 – Try It Online") Takes I/O as comma-separated integers but test cases removes and reinserts spaces for convenience. Explanation:
```
\d+
$*_
```
Convert to unary.
```
\G_(?<=(?=(\2_*,?)+)(_+))
$#1,
```
For `1` up to the first array entry, count how many entries are less than or equal the value.
```
\D+$
```
Remove the trailing junk.
[Answer]
# [APL(Dyalog Unicode)](https://dyalog.com), 6 bytes [SBCS](https://github.com/abrudz/SBCS)
```
+⌿≤⌸∘⍸
```
[Try it on APLgolf!](https://razetime.github.io/APLgolf/?h=AwA&c=037Us/9R55JHPTsedcx41LsDAA&f=S1MwVTBSMORKUzBRMIbSRgpGQNoYCI0A&i=AwA&r=tryapl&l=apl-dyalog&m=train&n=f)
[Answer]
# [Ruby](https://www.ruby-lang.org/), 37 bytes
```
->l{l[0].times.map{|x|l-=[x];l.size}}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y6nOifaIFavJDM3tVgvN7GguqaiJkfXNroi1jpHrzizKrW29n@BQlp0tKmOkY5hbCwXmGOiY4zMMdIxio39DwA "Ruby – Try It Online")
[Answer]
# [Desmos](https://desmos.com/calculator), 36 bytes
```
f(l)=[l[l>=i].lengthfori=[1...l[1]]]
```
[Try It On Desmos!](https://www.desmos.com/calculator/pqkwzsfya1?nographpaper)
[Try It On Desmos! - Prettified](https://www.desmos.com/calculator/jxxuj0y1bk?nographpaper)
This works because we can assume that the input is always in descending order as per [OP's comment](https://codegolf.stackexchange.com/questions/266332/compute-the-conjugate-of-a-partition#comment580757_266332).
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 9 bytes
```
.#'=,/!:'
```
[Try it online!](https://ngn.codeberg.page/k#eJxLs9JTVrfV0Ve0UufiSlMwUzBUMATSpgpGYNpEwRhKGykYAWljIDTiAgAEJwlP)
[Answer]
# [Scala 3](https://www.scala-lang.org/), 41 bytes
Saved some bytes thanks to the comment of @Kjetil S
---
```
a=>(1to a(0)).map{i=>a.count(_>=i)}.toSeq
```
[Attempt This Online!](https://ato.pxeger.com/run?1=VU7BSsNAEL3nKx6hhx1Igm0UJLgBj4KeiqcQZE2TspLu1s1WkZAv8VIPevGL-h9-gNtde_Aw8-bNvHkz719DI3qRf1dxqvSrMCquDz_68altLO6EVBgjYNV22DjChFkPBa6NEW_V0hqp1jUVuFfSgnsl8CJ69HKwg-vcOmQ-XSRYJJhTEnrnCfL_1E0XJ5r76YIo8o6dNmBHS1ylwZr-bgFb94PtFRvimVekJWZj59U0xeRVU3SMKLzWFWDL9rm6Ubbm5aki8M-d7dLLAwlesrnVEOyMKNuI7Sh5KbJG75RlDyWXNGVWu8Ww8DEF3O8D_gI)
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~59~~ 53 bytes
```
i;f(*a,z){for(i=0;z;i+=i<a[--z]&&printf("%d ",++z));}
```
[Try it online!](https://tio.run/##bZLBioMwEIbveYpB2BLXEUyMXlL7IqWH0K4lsGtLantQfHZXE7VagjnI9yX5h5mc4/Ovqq59r2VJvxU2YVveDNVFIhupo0Lv1TGOm9Nudze6qksafF0gwChqwlB2/YDgomqVHE9FmyND1kkyQzbCDPkG8hEKhBRhjdMJ82HBiouRp3a75YtIjDNs/tbBkxtvY26tK7AWnOYfZTgHLnE8uClmObmUY92f0hUNW1JSWxmmoST3Z/2gQTD8Ocq8lHtp6qViS996zjWY@4INZr5kg8IX7cfC2HDS9fnQEgYA@6I4AOTv/pPMdROu@vXzgNuzHi6BzRDINHffFj55@wA@/TQLMnfe4zn5Bw "C (clang) – Try It Online")
* -1 thanks to @ceilingcat  
`i<=*a;` -> `*a/i`
* Golfed another 5 Bytes by @att.
`for(i=1;i<=*a;)` loops until we print a[0] times
`i>a[z-1]?` check i against last value in input
`z--` move to previous position in input if greater
`:printf("%d ",z` else print position in input
`,i++)` and increment printed count
I think there can be a way to iterate i backwards.. e.g. `for(i=*a;i..` but my brains are cooking.
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 9 bytes
```
#*<|ZJ1Xg
```
[Try It Online!](https://dso.surge.sh/#@WyJwaXAiLCIiLCIjKjx8WkoxWGciLCIiLCIiLCItcCA1IDIgMSJd)
]