Post History
Ruby, 77 bytes ->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}} Attempt This Online!
Answer
#2: Post edited
- # [Ruby](https://www.ruby-lang.org/), 77 bytes
- <!-- language: lang-ruby -->
- <pre><code>->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}}
- </code></pre>
[Attempt This Online!](https://ato.pxeger.com/run?1=nVZdbhMxEG55zCmsfUrFslr_20iFE3CCalUlkKqRShslKdqo7Ul4qRC8cCM4DbNej79NxQNCUZQZrz3fj-3Jfv2-vV8enr9dnf-431-9Cb8-vHnXP8xV00h31nxe9JfLw0Pf7O8ud_NLedZ8vF5sd83u_vPD4-GxOj05OTmlz6vT01f0c1I1y8N-tbs4NNervnt6ehqL_p79rFrxVlyoWuhamFrYWrha-FqEWsRayJa-kr40QdIMSVMkzZGum8n_XajSwm6mh1_dzUzObS5ou5lD7X-t6oclvpuFXC1yCWLa5jGZOP9VDJOSOq_zI-LLeYZJMq3EydCTRF-nJzHTJCXScWHPATOUTFFKMoU5KvZVEnOlOCEEpQt7KqzYNmVBKU1j82Ke6LPPKrx0VbY0Gpk37Uib44GRljnJTgxDZes0B8xCWw5YsGbBmgXrOFFjWLCRHHB1w3swOG7Y8UixhQKia1hplmI8tpcyhjWRDxhDWoa0xV9SZ19sveStp0cme2h5l-mkWYaXQyUPaikPk11o-cjSeBw50hlPbIYxJ0uU-JBSp8sQO-zYYccOO3bYsVTHUj1L9eU4kQzPDnveP8_VvZ147hnBM4IvcijmbbQpDQwVSkegmJGCPvYlMGBgOaHY2I4WBT6wIZQnlMQXhtKE2AIxTvqRz7tHUiJ2eDx3cUqIxxKp4QzExCqNsQeRPYiltUx7S76VQwdQbWk0qpUIFUKN0CC0CB1CX5inNOBJLCFam5o0t9TQ0NKUnF4oSidXijKb7aYQ6GhXCg1LSSArICtoVQBV0KqgVUGrApoCmgKaApoGmgaaBpoGmgaaLqd6TIGogaiBqIFogGiAaICILmXYWANkM_k3owzA3KRSDGQDZAtkC2QLZAut1hwJtMd6jzoUpf44DcdpBDEHCg4U3LRbUloMkFzDwQCHjXZQ72C7O4Z35VLxiOfbbcuIBEUPPzz88GZqu5_-X4ydo1wCf-zN2OnShRh7XR5OrAqBAF8CfAmgEkAlwIsALwK8CPAi4CAEHIQItAi0CLQItAi03MPGGHARcBFwuZd1VXOzvl3tmtXi4_XDY_84E2KzXd_u5z29Wt5tXleiOqOxRb0875vd5ma9n1e0shreRTfDgtWXxY3on2jO9vzqYjG8ma67UmXZrG8_rfr59ky8F5W4XuxEWi4-3a124vZuT0NfViPG5n5PT68u-k6ci-r1Nr3kzvIr6_Pz-PsH)
- # [Ruby](https://www.ruby-lang.org/), 77 bytes
- <!-- language: lang-ruby -->
- <pre><code>->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}}
- </code></pre>
- [Attempt This Online!](https://ato.pxeger.com/run?1=nVZdahsxEE766FOIfbLpdln9S4W0J-gJggl24hBDmhjbKWuSnKQvobRPPVF7ms5qNfrWoQ-lGOMZrTTfj6Txfv2-fVgeXr5dn_142F-_C78-vfvQPU5V00g3az4vuovl4bFr9vcXu-mFnDWXN4vtrtk9fH58OjxVpycnJ6f0eXN6-oZ-TqpmedivdueH5mbVzZ-fn4eivyc_q1a8F-eqFroWpha2Fq4WvhahFrEWsqWvpC9NkDRD0hRJc6SbT-T_LlRp4Xyi-189n5ic21zQzicOtf-1qu-X-Pkk5GqRSxDTNo_JxPmvYpiU1HmdHxBfzzNMkmklToaeJPo6PYmZJimRjgt7DpihZIpSkinMUbGvkpgrxQkhKF3YU2HFtikLSmkamxfzRJ99VuG1q7Kl0ci8aUfaHPeMtMxJdqIfKlunOWAW2nLAgjUL1ixYx5Eaw4KN5ICrG96D3nHDjkeKLRQQXcNKsxTjsb2UMayJfMAY0jKkLf6SOvtq6yVvPT0y2UPLu0wnzTK87Ct5UEt5GO1Cy0eWxuPAkc54YtOPOVmixIeUOl2G2GHHDjt22LHDjqU6lupZqi_HiWR4dtjz_nmu7u3Ic88InhF8kUMxb6NNaWCoUDoCxYwU9LEvgQEDywnFxnawKPCBDaE8oSS-MpQmxBaIcdSPfN49khKxw8O5i2NCPJZI9WcgJlZpjD2I7EEsrWXcW_Kt7DuAakujUa1EqBBqhAahRegQ-sI8pQFPYgnR2tSouaWGhpam5PhCUTq6UpTZbDeFQEe7UmhYSgJZAVlBqwKoglYFrQpaFdAU0BTQFNA00DTQNNA00DTQdDnVQwpEDUQNRA1EA0QDRANEdCnDxhogm9G_GWUA5iaVYiAbIFsgWyBbIFtoteZIoD3We9ShKPXHaThOI4g5UHCg4MbdktJigOQaDgY4bLSDegfb3TG8K5eKRzzfbltGJCh6-OHhhzdj2_34_2LoHOUS-GNvhk6XLsTQ6_JwYlUIBPgS4EsAlQAqAV4EeBHgRYAXAQch4CBEoEWgRaBFoEWg5R42xICLgIuAiwxXNbfru9WuWS0ubx6fuqeJEJvt-m4_7ejd8n7zthLVjMYW9fKsa3ab2_V-WtHSqn8Z3fQLVl8Wt6J7pjnbs-vzRf9qup6XKstmfXe16qbbmfgoKnGz2Im0XFzdr3bi7n5PQ19WA8bmYU9Pr8-7uTgT1dttesud5HfWl5fh9w8)
#1: Initial revision
# [Ruby](https://www.ruby-lang.org/), 77 bytes <!-- language: lang-ruby --> <pre><code>->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}} </code></pre> [Attempt This Online!](https://ato.pxeger.com/run?1=nVZdbhMxEG55zCmsfUrFslr_20iFE3CCalUlkKqRShslKdqo7Ul4qRC8cCM4DbNej79NxQNCUZQZrz3fj-3Jfv2-vV8enr9dnf-431-9Cb8-vHnXP8xV00h31nxe9JfLw0Pf7O8ud_NLedZ8vF5sd83u_vPD4-GxOj05OTmlz6vT01f0c1I1y8N-tbs4NNervnt6ehqL_p79rFrxVlyoWuhamFrYWrha-FqEWsRayJa-kr40QdIMSVMkzZGum8n_XajSwm6mh1_dzUzObS5ou5lD7X-t6ocl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