# [JavaScript (Node.js)], 89 bytes <!-- language-all: lang-javascript --> c=>a=>a.map(c=>m[c]=(k=1+(m[c]||l++&&1)),m={},l=0)&&([,77.7,k-2?30:20,10,1][l]+c/10)/10|0 [Try it online!][TIO-jzkvvhyh] [JavaScript (Node.js)]: https://nodejs.org [TIO-jzkvvhyh]: https://tio.run/##bZDdjoMgEIXveQquDMSpy4/G7TbsPgjhwlBt3GoxappNap/dRah35QxhyJfDnPBb3avJju0wH27uXK@NWq36rnxlfTUQ3/faGkWuiqdka5elS9Mk4ZRCrx5P6BSjSUI0lGVWwvUgfiT7Egy4L6M7k9oPzqjfC1vv1YjneponrLBGGmMG2C/NIQcBhQk3ZsCjYxGRBO5RHhEPSLyQAOl98h3KofB6uURA@yw/xz8oIpLRJfYYQRGVEck9RlBEnzHh8S1C5oRQ40ZMtHXtbQLcWrcd9d9Q27k@G@ya@AsUPxDGG3VdnXXuQhoSPJQED6Un9Fz/AQ "JavaScript (Node.js) – Try It Online" I am certain that this is golfable, but there has to be at least one JS answer to an Arnauld challenge.