Post History
JavaScript, 73 71 63 53 52 bytes Well, this ain't pretty at all! Will need to take another pass over it to try to improve upon it, maybe with recursion.Yeah, I was completely overthinking this one...
Answer
#8: Post edited
# JavaScript, <s>73</s> <s>71</s> <s>63</s> 53 bytes- <s>Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.</s><br>Yeah, I was _completely_ overthinking this one!
- <!-- language-all: lang-javascript -->
s=>parseInt(s,-~`0x${[...s].sort().pop()}`)||s.length[Try it online!](https://tio.run/##BcFJCoAwDADAv4iHBDQI6lHvvkEEi9aN0pSmiODy9TpzqFPJ5HcXcsuzjksTpWmd8qI7G0Cy/BuLK717IpKBhH0AJMcO8B3xeYSMtmvY4sRW2GgyvMICSVWXCWL8AQ)
- # JavaScript, <s>73</s> <s>71</s> <s>63</s> <s>53</s> 52 bytes
- <s>Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.</s><br>Yeah, I was _completely_ overthinking this one!
- <!-- language-all: lang-javascript -->
- s=>parseInt(s,`0x`+[...s].sort().pop()-~0)||s.length
- [Try it online!](https://tio.run/##Dc6xasMwFIXhvU@RUcInlyu5qZNB3jp07lgKupHtJMVYwhLFQ@iru9oOP99wfuRXclgfqRyXOIz75Pbs@iRrHj@WojI8b775IqL8TTmuRWlKMSl9/GP9fGaax@VW7rs4zzC4QDBiAjPYwNRkwBaWYS3eTrhUILieK6iCKxwYoW5jW8g1oOs6vJ5aTznNj@LhX4SmuL5LuKvN9SEuOc4jzfGmNkoyfBapn1rd@IPrD76Z1Ka13v8B) (Includes all test cases)
#7: Post edited
# JavaScript, <s>73</s> <s>71</s> 63 bytes- <s>Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.</s><br>Yeah, I was _completely_ overthinking this one!
- <!-- language-all: lang-javascript -->
s=>parseInt(s,-~Math.max(...[...s].map(x=>`0x${x}`)))||s.length[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@7/Y1q4gsag41TOvRKNYR7fON7EkQy83sUJDT08vGoiLY4G8Ao0KW7sEgwqV6oraBE1NzZqaYr2c1Lz0koz/yfl5xfk5qXo5@ekaaRpKJqbGSpqa/wE)
- # JavaScript, <s>73</s> <s>71</s> <s>63</s> 53 bytes
- <s>Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.</s><br>Yeah, I was _completely_ overthinking this one!
- <!-- language-all: lang-javascript -->
- s=>parseInt(s,-~`0x${[...s].sort().pop()}`)||s.length
- [Try it online!](https://tio.run/##BcFJCoAwDADAv4iHBDQI6lHvvkEEi9aN0pSmiODy9TpzqFPJ5HcXcsuzjksTpWmd8qI7G0Cy/BuLK717IpKBhH0AJMcO8B3xeYSMtmvY4sRW2GgyvMICSVWXCWL8AQ)
#6: Post edited
# JavaScript, 71 bytesWell, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.- <!-- language-all: lang-javascript -->
a=>a.map(x=>n=n*-~Math.max(...b=a.map(x=>+`0x${x}`))+b[y++],n=y=0)|n||y[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5RLzexQKPC1i7PNk9Lt843sSQDKFKhoaenl2QLl9ROMKhQqa6oTdDU1E6KrtTWjtXJs620NdCsyaupqfyfnJ9XnJ@TqpeTn66RphEN1KtkYmqsFKup@R8A)
- # JavaScript, <s>73</s> <s>71</s> 63 bytes
- <s>Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.</s><br>Yeah, I was _completely_ overthinking this one!
- <!-- language-all: lang-javascript -->
- s=>parseInt(s,-~Math.max(...[...s].map(x=>`0x${x}`)))||s.length
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@7/Y1q4gsag41TOvRKNYR7fON7EkQy83sUJDT08vGoiLY4G8Ao0KW7sEgwqV6oraBE1NzZqaYr2c1Lz0koz/yfl5xfk5qXo5@ekaaRpKJqbGSpqa/wE)
#5: Post edited
# JavaScript, 73 bytes- Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.
- <!-- language-all: lang-javascript -->
a=>a.map(x=>~~`0x${x}`).reduce((n,x,_,a)=>x+n*-~Math.max(...a))||a.length[Try it online!](https://tio.run/##DcpBDoIwEADAvxAPu1o2Juqx/QEvMEY2pYCmtgSq2UTs1yvnmSd/eLHzY0p1iJ0rvS6sDdOLJxBtcm6PsvvKr0WaXfe2DiAoUXfFqI0cwr7ODadx@wJExIjryuRdGNJYbAxL9I58HKCH6@bV@XKqbojlDw)
- # JavaScript, 71 bytes
- Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.
- <!-- language-all: lang-javascript -->
- a=>a.map(x=>n=n*-~Math.max(...b=a.map(x=>+`0x${x}`))+b[y++],n=y=0)|n||y
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5RLzexQKPC1i7PNk9Lt843sSQDKFKhoaenl2QLl9ROMKhQqa6oTdDU1E6KrtTWjtXJs620NdCsyaupqfyfnJ9XnJ@TqpeTn66RphEN1KtkYmqsFKup@R8A)
#3: Post edited
# JavaScript, 65 bytes- Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.
- <!-- language-all: lang-javascript -->
a=>a.map(x=>~~`0x${x}`).reduce((n,x,_,a)=>x+n*-~Math.max(...a))|1[Try it online!](https://tio.run/##DcpLDoIwEADQuxAXM1omGmXZ3sATGAKTUlQCLeGXSdRevbJ9eR1vPNvpPS65D41LrU6sDdPAI4g2MdZnOXzkVyNNrlmtA/BKVKUYtZGTP@bxzstr/wJExIjfS7LBz6F31IcntPDYPbsV16xETH8)
- # JavaScript, 73 bytes
- Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion.
- <!-- language-all: lang-javascript -->
- a=>a.map(x=>~~`0x${x}`).reduce((n,x,_,a)=>x+n*-~Math.max(...a))||a.length
- [Try it online!](https://tio.run/##DcpBDoIwEADAvxAPu1o2Juqx/QEvMEY2pYCmtgSq2UTs1yvnmSd/eLHzY0p1iJ0rvS6sDdOLJxBtcm6PsvvKr0WaXfe2DiAoUXfFqI0cwr7ODadx@wJExIjryuRdGNJYbAxL9I58HKCH6@bV@XKqbojlDw)
#1: Initial revision
# JavaScript, 65 bytes Well, this ain't pretty _at all_! Will need to take another pass over it to try to improve upon it, maybe with recursion. <!-- language-all: lang-javascript --> a=>a.map(x=>~~`0x${x}`).reduce((n,x,_,a)=>x+n*-~Math.max(...a))|1 [Try it online!](https://tio.run/##DcpLDoIwEADQuxAXM1omGmXZ3sATGAKTUlQCLeGXSdRevbJ9eR1vPNvpPS65D41LrU6sDdPAI4g2MdZnOXzkVyNNrlmtA/BKVKUYtZGTP@bxzstr/wJExIjfS7LBz6F31IcntPDYPbsV16xETH8)