# [Jelly], <s>6</s> 3 [bytes]

-3 bytes by having I/O as a [decimal list of digits](https://codegolf.stackexchange.com/questions/110836/efficient-counting/110861#comment269927_110836).

    ṫTṪ

Test suite at **[Try it online!]**

### How?

    ṫTṪ - Main link: listOfDigits  e.g.  [1,    0,    2,    0]  or [1,      1,    9  ]
     T  - truthy indexes                 [1,          3      ]     [1,      2,    3  ]
    ṫ   - tail (vectorises)              [[1,0,2,0],  [2,0]  ]     [[1,1,9],[1,9],[9]]
      Ṫ - tail pop                                    [2,0]                       [9]

---
If we could not take decimal lists a 6 byter is:

    DµṫTṪḌ

Which you can see **[here]**.

This does the same thing, but converts an integer to a decimal list beforehand and converts back to an integer afterwards.

[Jelly]: https://github.com/DennisMitchell/jelly
[bytes]: https://github.com/DennisMitchell/jelly/wiki/Code-page
[Try it online!]: https://tio.run/nexus/jelly#@/9w5@qQhztX/dc53O7Ndbj9UdOayP//o6MNY3WijYDYUMcATIL5OpZA0hgsYglmA2Vh8lC@EZhvBBU3AdIwdSCZWAA

[here]: https://tio.run/nexus/jelly#@@9yaOvDnatDHu5c9XBHz/@jew63P2pa4/7/f7ShjpGOoYGOIZC21DE20LG0BHJBfCBtZKBjBGSbGIDEjAxiAQ