CSI: Minecraft Items Minecraft 1.12 will be released tomorrow, so let's celebrate!
Write code that takes in a non-negative integer N which represents the number of items of something in Minecraft. Output it in a way more helpful to players, giving the number of chests, stacks, and items N is equivalent to. Use the format
XcYsZi

where

X is the number of chests you can completely fill with N items,
Y is the number of stacks you can fill with the items remaining after filling chests,
Z if the number of items remaining after filling chests and stacks.

Note that:

64 items fit in a stack. (We'll ignore items that stack to 16 or don't stack.)
27 stacks fit in a chest. (These are single chests, not double chests.)

So it would never make sense if Y is more than 26 or if Z is more than 63.
A caveat with the format is that if there is zero of something, that term is not printed.

So, for example, if Y were zero and X and Z nonzero, the format would look like XcZi.

Likewise if Y and Z were zero and X nonzero, the format would be Xc.

The exception here is when N is zero. Then 0i is the output rather than an empty string.


You can assume all N items are of the same type, hence all stackable.
You may not output a list or tuple of three numbers. You must give a string with the exact &quot;csi&quot; notation, in that order, with no spaces or commas.
For reference, here's a chest completely filled with stacks of items:

Testcases
in -&gt; out
0 -&gt; 0i
1 -&gt; 1i
2 -&gt; 2i
62 -&gt; 62i
63 -&gt; 63i
64 -&gt; 1s
65 -&gt; 1s1i
66 -&gt; 1s2i
127 -&gt; 1s63i
128 -&gt; 2s
129 -&gt; 2s1i
200 -&gt; 3s8i
512 -&gt; 8s
1337 -&gt; 20s57i
1664 -&gt; 26s
1727 -&gt; 26s63i
1728 -&gt; 1c
1729 -&gt; 1c1i
1791 -&gt; 1c63i
1792 -&gt; 1c1s
1793 -&gt; 1c1s1i
4096 -&gt; 2c10s
5183 -&gt; 2c26s63i
5184 -&gt; 3c
5200 -&gt; 3c16i
9999 -&gt; 5c21s15i
385026 -&gt; 222c22s2i
1000000000 -&gt; 578703c19s

The shortest code in bytes wins.
Jelly, &nbsp;26&nbsp; 24 bytes

d64d1¦27Fża¥“csi”Fḟ0ȯ⁾0i


A full program taking the number and printing the result.
It does seem too long to me...

Try it online! or see the test suite.

How?

updating...

d64d1¦27Fża¥“csi”Fḟ0ȯ⁾0i - Main link: number n
 64                      - literal 64
d                        - divmod (whole divisions and remainder)
      27                 - literal 27
    1¦                   - apply to index 1 (the whole division from above)
   d                     - divmod
        F                - flatten into a single list (of three items i.e. [(n/64)/27, (n/64)%27, n%64]
            “csi”        - literal ['c','s','i']
           ¥             - last two links as a dyad:
         ż               -   zip
          a              -   logical and (any 0s in the divmod result become [0,0], others become [integer, character]
                 F       - flatten (from list of three lists to one list)
                  ḟ0     - filter discard zeros
                     ⁾0i - literal ['0','i']
                    ȯ    - logical or (non-vectorising)
                         - implicit print (smashed together representation, so [578703,'c',19,'i'] prints as 578703c19i)