[Question]
  [
Given the name of an HTTP status code, such as `OK` or `Continue`, output or return the corresponding number. Your code is limited to **200 bytes**, and the winner is the answer that correctly finds the number for the most status codes.
For this challenge, the status codes your program should handle are:
```
100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
```
Test cases:
```
Continue        -> 100
OK              -> 200
No Content      -> 204
Not Found       -> 404
```
For invalid status codes or ones not supported by your program, any behavior is fine. Input and output can be in any reasonable format. If there is a tie, the shortest program that can support that many status codes wins.
  
[Answer]
# [Node.js](https://nodejs.org), ~~135 126 125~~ 123 bytes, score 40
*Saved 2 bytes by using unprintable characters, as suggested by @dingledooper*
```
s=>Buffer('~>/6%sH~~d4~\\~i~~,~~~~~.~~~~n)W*~~~~;~CR@M"~1E~$~ _Z9~')[parseInt(s[0]+s[4]+s[19],34)*57%65]*209%523
```
[Try it online!](https://tio.run/##VVJNbxoxED1WinpoK7WV2kOtqgiWAE34SIQiUAkiCWpoEB@tVIIqZz0LrhZ7a3sh9OC/TscGVLKHlWc8896bN/5Nl1SHiiemKCSDTdTY6EbzMo0iULmsbX4@y@gba5@xqr2/t9y@ss8L1r63L1/bd7Zk8RPBj7d5d7iw7cGX3kd72rGfLPn1s24/vHmRDSYJVRq6wuT05GR6rCdV9zutTwuVapCvnWfOatN8@aSeqZUrm4tJti2F4SKFbCE7XHETzrmYkb6SRoYy1pi9@4q/tgJqgOGpFYaQbI/fpCi2UjOXihtq@BJIV0RSLfAshb8nDh2EwWAAGsxB3KfKcBofZHppbHgSA2nPJQ/BcffkEhjpA2IKLIrXmLuSqXDsQwByZ@agPJMhPcl4xL2wsQY3wqMrH8EikYqqNRkA4wpCR3VJGYZ/UtAuGgu6neKv7@7T9QLJfAE2MM@pHjhjIHZcew09wD5GXKoVx3K1swUj7xJ9iJ2vXgpxTiEsD709h@g7JWTEFyBTpwhNiWLupV5L4TBuQczM/LCrj7NIwbhHu6I8foLVQSazJiMpyS1VM/h/VRwPutu8FDM/vU4TtAh3SnpoESWjdXJQj@kBFTPwUw5RvI74brDOY4J@0qcK8OmBErjZIaglKNJRSu531F3gfp25vtJt4Rqf1Yqu/T7VEtdOcBtLxNpR7O4PvLkZjfrkOyjtWL2mvfzs9OiohA@wQ8N5TpNGk6BBWsZQiuUsp0sJZR3BcpVyQI5JlNNBEGz@AQ "JavaScript (Node.js) – Try It Online")
### Decoding example
Let's consider the input string `"Internal Server Error"`.
We extract the characters at indices \$0\$, \$4\$ and \$19\$ and concatenate them together:
```
**I**nte**r**nal Server Err**o**r
^   ^              ^
```
This gives `"Iro"`.
We parse this string as a base-34 value, leading to \$\color{blue}{21750}\$.
**Note:** For many shorter entries, some characters are undefined. This leads to strings such as `"Piundefined"` and much higher integers.
We apply the hash formula:
$$(\color{blue}{21750}\times57)\bmod65=5$$
We extract the corresponding character from the lookup string (which is a `"s"`) and take its ASCII code, leading to \$\color{blue}{115}\$.
We apply another black magic formula to turn this into the final HTTP status code:
$$(\color{blue}{115}\times209)\bmod 523=500$$
Given an HTTP status code \$c\$, the ASCII code \$k\$ of the encoding character is given by the following reverse formula:
$$k = \lfloor c / 100\rfloor \times 23 - (c \bmod 100) \times 5$$
[Try it online!](https://tio.run/##bZHPSsNAEMbveYohIJvYJGazu621VpHioQdPOYqHsP2Tmtot2yCC@gaCF4/6Hj5PX8BHiN@mFCoYGGZ3ft98O2Hui8dio@1iXccrM5k2jTarjVlOk6WZB4w0avRCV/loPEbWZWGTNk91xcKB90cdt18n/j87uXfL0zTiKY8y5KzNGUIgJEIhupEAE2ACTIAJMAEm0l4kwSSYBJNgEkyCSfTJlp8i@pHk0HHoOHQcOg4dh45Dx3uRgo@Cj4KPgo@Cj0rVnZfMjL0udBloGl7Qs0dU0ZBuirpMZktjLOonhL8I6ZgyQTGhcLQvqAH0FvrK0bQPojLhirrclc9JZHRJLH1i1KEqqU1e28VqHvBumKyLSV4Xtg6yiOB3Rj7zodopkpk1DyMsYISdBFUI4DPyW/ODLfhErkc7jE21l4NnDh4RrQXtRW7CXY@7uXOAkYdwwrjbz4@f73eGkdj2680dQ6zzNRw0zS8 "JavaScript (Node.js) – Try It Online")
---
# [Node.js](https://nodejs.org), 84 bytes, score 40
With a built-in.
```
s=>Object.keys(c=require('http').STATUS_CODES).find(k=>c[k]==s)||413+(~s.length/6&3)
```
[Try it online!](https://tio.run/##VVNRb9owEH7vr/DTkqgj08a0lylIjNEOrRREwl6qajL2hbgYO7Wd0EzV/jo7G9DSl8h3vrvvu@9znmhLLTOidgOlORzL7Giz0WLzBMylO@hszDIDz40wEEeVc3WUpHkxLtb578ni@zRP0lIoHu@yEXvYPWaZTV5fP38cXsd/bSpBbV314cu7YXL8@hBNtHJCNRC9j/KDcKwSakuWRjvNtLSYXfzEz8QAdcDxNGYM6tPxXqvBuHGVNsJRJ1ogM1Vqs8ezVuGe@OmgHAYrsOB68ZIaJ6jsZeaNdKKWQCaVFgw89ly3wMkScKbCItlh7kY3yqPnAGThKjAByZG55qIUgdjagl/hxZcXsK@1oaYjK@CoF/NQ3yjH8LkB66O1oqct/oTuJe32CBYKsIEHTLMRnIM6Y104zAH7OPGpsZT6cJYFo6AS3Uiva6BCvFI4VrAgT3/6mQkpxB504xmhKKUUgeqtVn7GXXCt37XEXbTiIky7oUK@mTVFJNeRQmtyR80W/l8N1qvZKa/VNmxvmxolQk/JHCWipOjqXj2mV1RtIWyZI3lbivNi05ca9aRvGczQT6PQ2RxMC4ZMjdEXj2Z79NeLGyq9C7f4rA60C36aFm0n6EaLs84Q5/ueNj@KYkl@gbEeNXC60I8er65SfIBTyqrYkmxEUCCrJaRSb2Ob1pRP8a8YfkrINSljmyTJ8R8 "JavaScript (Node.js) – Try It Online")
### How?
There are 3 strings that do not match the values stored in `STATUS_CODES` for codes **413**, **414** and **416**. For these ones, we use the length of the input to figure out the correct answer.
```
 string                            | len | ~len/6  | &3 | +413
-----------------------------------+-----+---------+----+------
 "Request Entity Too Large"        |  24 | -4.1667 |  0 |  413
 "Request-URI Too Long"            |  20 | -3.5000 |  1 |  414
 "Requested Range Not Satisfiable" |  31 | -5.3333 |  3 |  416
```
[Answer]
# [Python 3](https://docs.python.org/3/), 68 bytes, score: 40
A cheap builtin answer.
```
lambda s:+http.HTTPStatus[re.sub('\W','_',s.upper())]
import http,re
```
[Try it online!](https://tio.run/##TVPLTttAFN3nK@4GOVZDFOcBLVIWFAGNSkpEQrsAVE3sm3gke8adGSe4@@76Ce3P8SPpGZvQrDz3ec4997qoXKrVYLcaP@4ykS8TQfbsXepc0f20WMzmTrjSPhju2nLZDh6/BZ3ge9Cx3bIo2LTD8Kkl80IbR76kY3i3TWXGFJ21KNYJd0iJnGlMUhWla4ddW2TStQMKOhSFLSqMVDCPLFKObEBH1F61fUnYIR/xPUK8g5e/v1/@/AoeXqM0Hv@PP4W7qNejC62cVCW3ol5E8610cSrVmmZGOx3rzLb6SLr9jE9EF4aF4wTvPp3HMReNMaAvWh2fl9DESIwuN0wTtdImx1srZAyRUSOxcjBHdMeW3YHnhGbCOCmyN98AsNMyc7KAMBepljFbOCOa6g0nNGN0V0jMKnj7dKVLleA1oDkz3bqUDSyP61CRyJVkHx7RvWU/3LMvO6UF@z0IU4FRIg3HrjUE8EeRwPGjZOvtiO6VaKb7iS5DwM1ElQO8TkKZdw7AwSxlkrCC1SA3rIaAnTLqk9p5nmV6W5ecNHatpFhmDNdpQ468mgCQcS3hIc77PTNayJx16Rl@8LKtMunpRz261gq9oohuWK1delAdgTqm1CqRdd8rgbvz/sFb10uguooWWtONMGvfaLgPHt/fTZqIVmsEIKeyOGqcMnYyhYSCFlXha072NQjcCbXmetY5xrEr2QwbndLlcwHNxSGXEfSf4AaMwjXM2WzY0KUx2iAS1U0mOW7Cy19n9@ttXeMwt6KCPaiLcC5@axv0rMFG2MhrzptuI@zF/670lY31DGqG@3H@AQ "Python 3 – Try It Online")
# [Python 2](https://docs.python.org/2/), ~~131~~ ~~119~~ ~~115~~ 104 bytes, score: 40
A nicer method with the same score, using a magic formula. [@Arnuald's answer](https://codegolf.stackexchange.com/a/220538/88546) had a really nice way of calculating the status code, which saves me *a ton* of bytes.
```
lambda s:ord('?".\, ;
?Zd?s>M?C6/W4?)??*??H1@R???i_??n$?9E?%'[hash(s)%762%517%233%56])*209%523
```
[Try it online!](https://tio.run/##TVNRbxJBEH40ufigJmqiD06MlzsqRe6OA1uDZyW0JZaWANVo25jt3QKbHLvn7kKLfx5n96DyxM3M9803881SrPRM8HA9aV@vczK/zQioQyEz30tevK1dV@HT4@RX9iR5oz4/fd1POq@aj559@NFIKkmylySnwZfnwyRJ2O8k4e@Sg27y0vWuZkTNfFVxW83QjYOWG0aRGzdvKnth/cCNw2jN5oWQGtRKOSoVkkIb6s5ESFDAuEnXlM4Yr0lKspxxqvzKoQOpyGgVOJkbvIFIVviVmipypn0PvCoEFcfApKSpRszEN@AKtNvYVvuGX3GgVHzf3gIdKCSWwXMVclzlgQv@hlr9T8Rv7/ynd7Vh3Tgb1qhzMeweorjtuw7qdegIrhlfUCeoBzC6YzqdMT6FgRRapCJXToigi2/4E0AHd9Q0w@8QjtKUFmUQwbng@0cLPI5kmmi2pNDjaNEcvwVHRAMRVolyjWEMQ6qo3sk0YUCkZiR/yEUo21/kmhU5hc5MsJQqTAbQF0uawYBid47AfIXZEI7Fgmf4FcGIUrjQMyoxMroaGRmbMGrKMVwqapa7N7QWjKm5LpErnChj1uEGCn8lGSb@LKgycQCXnJTb/cUuDZQbkNUcxS0IaSYZ4QzylmUZ5RiVyuVUDZTtU@RnNnmU5@LOUpplbJ0ktznFVKscDoybKMBSa@GuzsftZDBmcyoWZsIDY9skZ2b8oA4ngmOvIIAzyqd6tsMOcHTcUvCM2b7HhOU2Hz107aKqXsFYCDgjcmoaNbbF/cthr6wIPsUC2snVojB/ELxJHy0kMF4VhtPccrAwJHxK7a4jXEdNWLls0ILufYGek91ZYvS/h29AcnwNIyqXVEJXSiGxEtgmvTm@CWO/RYf2Wif4MO/ICuPIkvC5mKstsacVi/EiG8yDbzHe5XQ8HsB3KpWZwE64Xecf "Python 2 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), score 40, tiebreak score 61 bytes
```
ȷ;€ȷḥ€ɠḋ“^,fḷɱ⁹⁴ƒẈ®ẒỤĖṅ}PG¬Ƭṙ⁴&©ẉ}Ḳḍƙḋ¥ȤẊḌÐẈ’b123¤%127b28ḅ³+³
```
[Try it online!](https://tio.run/##AYcAeP9qZWxsef//yLc74oKsyLfhuKXigqzJoOG4i@KAnF4sZuG4t8mx4oG54oG0xpLhuojCruG6kuG7pMSW4bmFfVBHwqzGrOG5meKBtCbCqeG6iX3huLLhuI3GmeG4i8KlyKThuorhuIzDkOG6iOKAmWIxMjPCpCUxMjdiMjjhuIXCsyvCs///T0s "Jelly – Try It Online")
# [Jelly](https://github.com/DennisMitchell/jelly), score 40, tiebreak score 58 bytes, in collaboration with @Arnauld and @ChartZ Belatedly
```
ȷ;€ȷḥ€ɠḋ“Rḳk_ṇṙƤĊ⁻ƒƓḍ¹⁹¡Ɱṫ°ė÷Ḣ4[⁶æȥ.’b41¤ị“£¬®Ø©‘Ḷ+"J×³ƊF¤
```
[Try it online!](https://tio.run/##AZsAZP9qZWxsef//yLc74oKsyLfhuKXigqzJoOG4i@KAnFLhuLNrX@G5h@G5mcakxIrigbvGksaT4biNwrnigbnCoeKxruG5q8KwxJfDt@G4ojRb4oG2w6bIpS7igJliNDHCpOG7i@KAnMKjwqzCrsOYwqnigJjhuLYrIkrDl8KzxopGwqT//1JlcXVlc3QgRW50aXR5IFRvbyBMYXJnZQ "Jelly – Try It Online")
## Discussion
I found an almost asymptotically optimal algorithm for solving this sort of problem (mapping a set of given inputs into specific numbers, not caring about other inputs) [a while ago](https://codegolf.stackexchange.com/a/214222). The algorithm takes a few bytes to express in Jelly, but the savings in not having any wasted bytes actually describe the outputs are worthwhile, making this the currently shortest non-builtin-based solution. (As a side note, it may well be worth adding the algorithm in question as a Jelly builtin, which would save 11-13 bytes from this program depending on how it was implemented; it seems likely to come up in the future.)
The algorithm basically generates programs that work by running a large number of hash functions on the input to produce a vector of hashes, then taking the dot product of that vector with a hardcoded vector over a finite field. (When implementing this in Jelly, we use a finite field of prime order, because it doesn't have builtins for dealing with other sorts of finite field.) It turns out that the minimum length of a hardcoded vector that solves this problem is almost always equal to the number of input/output pairs, and the maximum size of the vector elements is the order of the finite field, so the amount of storage used by this is equal to the amount of storage needed to store the possible outputs (thus asymptotically optimal). Adding a new HTTP status code to this program would typically cost less than a byte on average per code, unless it was outside the range of the existing codes (e.g. [here's how to add "I'm a teapot" to the original program at the cost of only one more byte](https://tio.run/##AZAAb/9qZWxsef//yLc74oKsyLfhuKXigqzJoOG4i@KAnMKiyKfKgsKm4bqOa8Kh4buNxpnCtsmT4bmY4bqgWMOeYDNeyovigbXGk@G5rOG5m8Kp4bmYQMK94bqg4biNw4bhuIrDn@G5hSh04biK4oCZYjEyNsKkJTEyN2IyOeG4hcKzK8Kz//9JJ20gYSB0ZWFwb3Q "Jelly – Try It Online")).
I've since automated a program generator that generates Jelly programs to solve these programs. So this codegolf submission was pretty much entirely automatically generated. [This is the generation program I used](https://tio.run/##hVVNbxtFGL77V4xWqmSrG@P1B/2IekirtqQ0bZS4RdCWarw7a0/ZnVlmZpOYU0FCHHrrqQeQOMANIaHQphUSB1eVys9I/oh53tl17AgEh935eL@e93OeiCybzucnT7@/mmlrdc5SmTlhmFCxToRpNxobZlzmQjl7uTE7ZFdYJq1jOmVSFaWzrMnVlLlpIVph4@Tr31cYYm2MsIVWiVRjpkv3L/wvwa/KfASLkCgAQY4ysWTOS@gaCVYYmYsWW2NJWWQy5k5Yxo2AjVI5kTCtYhEyrhI21SXL@ZTxJGHiwBl@qkwqIhrIJDrnOLkJd16LEnsAUFookqnXsC/thPC9Ar5bFCMg0GPD80qoig4gqFo7lDtNR6xiDGVevWCGq7FgnXb7c/K1aUoFIQcIeSHhp4NXIbMaCGBbae/rWGepSHx4jv7X/H/aW4CqMTbJACAgiIZSUqkJ2Qg07zy3rODGJ4@UpVLxbGG5hVIY4jLnBzIv85Ws1YUgLTKfS8oGrEadTodAaYMqooucfyG81hrMwiEOKeeyym0J3uYTynk88Z6QgBUxamgByk2MEOz9kSWlEOaG3K/RjESm94lwKi7tAvgiUQgb2@VjcSakIdufCEXBCanWUO3g@mfkl2yoEDdBxlA/dXucCi5DNxZKGE4ROdtdQHRHO3HZ42MTTsZszrPM444F@YpMokxhP@UyQ7ZCZE1UPlscSziOmDojDxBj1hyJmCOHNWbsLBvJ8ZpA86EARtxSryiUuZVa2dZCGWHNBPcdmsixRO6rQoLwMqhE5aiqxqdojRj6Ulj1bgJbSW3oYVsAUiXcmIaEyeeR2pCjvPerMvlgkX0ufVUERhidZUEdNB@ck6c/NDBqbq2ffPPL@6Pj1z9jnb1h51DRDQyqHD2x5R1v3rzRBDOjUgehFTI6zQ7ffgeJd8@P37zw1@zhf/KjyWcv905@@5Wm1yefLeVmr8wV60wTFd@kmdbMW602BopPx@NYizSVsUTqm612JlMs5yMI@SpoGlFAsu3lIIZjxmPRDFgQBkGLnWfB8etvA6yG9qPuoHP8x7O3L249LLudKPH/eL1a3h@tRuKvH49fP6u41tdXuC/V3KNTpbOfzq14W4sQtbo9On7zp3cWRI82CNpPtFQUovV1CkALu3fP7/tgYDufzx8E17RyUpUCbuyiBeIJ1ca20U7HOrO4vfsxfteMoLLHbiOORVFt72i1tlG6iTbScSf3BNtUqTYoYpSkpzPSjoDisCOscCvnbcwliZZa3myVmZMFBse1iZYoPrrSe@i1bQGdCkzZFHc38EKQ9V1MjbuoMuMtObalE4l5Q6R7aA64cEDsQ5EX2nAzZTsikUbEZOoqT3D8shSWTvcUr7z4yktv8yn1v2eAQOJtmpFMEqFqWwsMWwJyCaOrjQyTqg4LTj5KHE8fKSQojCIFtfTWITyr2mskbIjHA@1E4dYqxatI25takY7bQo0xn1akto0fo9Jru4EiPqPrOiy5KRtqzW7TRF2S1u7tbFb3Wo2997YsECKaalsIEWdDPOZLflzv@NlLfu0CvE1l7dj1gwLx5GcRbCKfhoblrjD0Cl83Ri9ytJkjvxRcz0lZuImy2udTn0@zh7QzZGMPumoTNX0lNh8Nh9vsfjX3KkwL@MGj@QM8U2HUicIu1q5fu/h6@Pr4Bvg@DHug9UDrgdYDrQdaD7Re50LYB60PWh@0Pmh90Pqg9SHX9/SL@C6F/Qh8Efgi8EXgi8AXgS8CX3QhHEDPAHoG0DOAngH0DDqDR/Ooe2EePAbMET6MjO7FYI5xcRHb2eH52WHwNw "Jelly – Try It Online") (configured to generate a solution to this problem). The Sage program it generates, when run, generates [this Jelly program](https://tio.run/##HYw7DsJADERPQ8UUa@9mP8oNuAKiiUSDcgG6CImKC4AEEgV0dCkSiS404RibiwSbwhp7PPN227rez/OajIFnkAmgBI5Qo5CjgEcAi3hYA0JKcAYhgZiRIpyFN4gBTurEmtCFEC2i1CKChRQpapqErhgPR4p0fpP7I7GtuDD5ffqcV1Nzm5prKTN25XR4jV3un6Lfe@5P8izLf@KiiUqaw2NBHPShBkfhDe1yaMWZ5x8 "Jelly – Try It Online") which generates the program written above.
The reason I've described the algorithm as "almost asymptotically optimal" is that it has two failure modes. One is mathematical; the algorithm involves solving a set of simultaneous equations, which can almost always be solved using a vector whose length is equal to the number of input/output pairs, but rarely and randomly have no solution (the odds of this become smaller as the size of the codomain becomes larger, and when it happens you can "reroll" by adding an arbitrary extra input/output pair, leading to a slightly larger program). The other is a deficiency of Jelly; the shortest way in Jelly to describe a list of integers drawn from a uniform random distribution is to use a large constant integer and base-convert it, but this mechanism is incapable of expressing lists with a leading 0 (the program generator I've written above doesn't attempt to fix this problem itself, but the odds of it happening are again just 1 in the size of the output domain).
## Explanation (original version)
Here's how this program is implemented in Jelly:
```
ȷ;€ȷḥ€ɠḋ“…’b123¤%127b28ḅ³+³
    ḥ                        Hash
      ɠ                        a line taken from standard input
                             using
     €                         each of the following hash configurations:
ȷ €                              each number from 1 to 1000 (the salt)
 ;                               concatenated with
   ȷ                             1000 (the codomain of the hash function);
       ḋ                     take the dot product of the resulting hashes and
               ¤               a constant calculated by
        “…’                      converting a large constant integer
           b123                  to a list of base 123 digits;
                %127         take the resulting dot product modulo 127,
                    b28      convert to a list of base 28 digits,
                       ḅ³    interpret as base 100 digits,
                         +³  and add 100
```
Everything up to the %127 is just the implementation of our general-purpose input→output mapper. The `b28ḅ³+³` after that implements the inverse of a function that maps HTTP status codes from 100…505 onto integers in the range 0…117; producing a smaller codomain allows for a smaller hardcoded vector. (The basic idea is to note that the last two digits of the status code are never greater than 27, so the double base conversion "closes some of the gaps" in the range of possible outputs.)
As it happens, our hardcoded vector didn't contain any of the values 123, 124, 125, or 126, so it was possible to use 123 as the base for that base conversion. (The gain from this is minimal; if Jelly had a builtin for this algorithm, you'd hardcode that the "123" and "127" were the same number.)
There's no particular algorithmic reason for the codomain of the hash function to be 1…1000 (any sufficiently large codomain would do), and calculating 1000 hashes is likewise not algorithmically useful because we only use the first 40 of them. This is just a tiny byte saving: 1000 has a 1-byte representation, whereas most other numbers can't be written in a single byte.
Incidentally, the reason we take input from standard input is that 100 (the lowest HTTP status code) can be represented in 1 byte in Jelly if the program has no command-line arguments, but takes 3 bytes if there are any command-line arguments. There wasn't a byte cost to doing anything because I needed to take explicit input anyway (attempting to take implicit input would run into a parse ambiguity that would need a byte to fix, so the extra byte for explicit input doesn't cost).
## Explanation (improved version)
@Arnauld suggested, instead of the base-28 calculation used in the previous version, to generate a list of the 41 possible (return values + 306) (trying to omit 306 from the list would cost more bytes than simply just adding it; and including it also gives us a prime number of possible outputs, which we need to be able to do finite field operations over the range of outputs in Jelly).
We can generate a list of the values like this:
```
“£¬®Ø©‘Ḷ+"J×³ƊF
“£¬®Ø©‘          [2,7,8,18,6]
       Ḷ         range from 0 to n-1, i.e. [[0,1],[0,1,…,6],…]
             Ɗ   group the three preceding bultins together
        +        add
           ×³      100 times
          J        the index of
         "         each sublist to every element of the sublist
              F  flatten
```
In other words, we're adding 1 to each element of the first list, 2 to each element of the second list, etc., 100 times, thus effectively adding
[100,200,300,400,500] to each element of the corresponding sublist of [[0,1],[0,1,…,6],…] to produce [[100,101],[200,201,…,206],…], which can be flattened to produce the list of status codes we want.
I originally generated the list using slightly different code (doing the addition 100 times rather than adding 100 times the index), and connected the list to the original program using a newline and `ị¢`; `ị` is wrapping indexing into a list (thus contains an implicit "modulo 41"; 41 is the size of the finite field we're using in this version and also the number of status codes in the list), and `¢` tells Jelly to look at the previous line to find the list to index into. However, @ChartZ Belatedly realised that rearranging the list generation like this, although it still takes the number of bytes, makes the list generation into a nilad followed by a sequence of monads. This makes it possible to treat the entire list generation like a literal constant by using a single `¤` byte, which is a less general method of specifying the grouping than the a newline and `¢` were, but worth it as it's a byte shorter overall.
This approach, where almost all the outputs are used, costs several bytes for the more complex post-processing, but makes the hardcoded vector require substantially less storage because the numbers in it now only go up to 40 rather than 122, so it saves more bytes than it costs.
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-n -l -rnet/http/status`, 31 bytes, score: 37
```
p Net::HTTP::STATUS_CODES.key$_
```
[Try it online!](https://tio.run/##TVJNc9owEL3rV@yhVyd3bpSQlGkcPNj0mhHWYmsqtK60hrg/vu5KJCQ3Sfv8vtZhPEzzPMAL8mLxo2mqxaJuls2@fl1tH9b13W@cvr3O84o8Wz@iqi@W2976DqpATC25qLY/1SqgZjRq2bY4pMML@WI5ck/BsmZ7Rtj4I4WTnMnLFBIjelY7jMi3W6UDW@1u93J0bAeHsOrJthhVSWc0UKEweQG4ST3S6I2qEWHLPQbhZijJ2KMVG/uIyejbpBo8DRR0mGCHxgZsWX3XRi5/Roys9l5f3f6Vryo9nYQ8DwVqRCMcrDHoM/tVsUTBG0gPS@fokkPLOTegDw5VFobUgpDZNkf/5HxXhsaekEZWEvnorNh6Io/qGX3H/Se6Esfkjc0cj9q6LwxrYecJGiJ41qHDj0Gx322ur@Q7SRjHQSqQ7UApFWhopuGGlced9h3mPLVYjUebQ6zfBulKf9XdyG6Cly3VGM4YYB0CXXvfnGRXqTpBpXaf5Ke46EkloKwPpOWzcGTi99ktf/r54BeGmJSyiw@7/2hI8nEu/Fy4uQge@b5nHu6jGBvjfw "Ruby – Try It Online")
Another cheap builtin answer. Not a perfect score because the reason phrases in the library are taken from [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#page-49) instead of the older [RFC 2616](https://www.rfc-editor.org/rfc/rfc2616#page-40) (as used in the question).
---
# [Ruby](https://www.ruby-lang.org/) `-n -l -rnet/http/status`, 47 bytes, score: 40
```
p Net::HTTP::STATUS_CODES.key($_)||416-~/$//7%4
```
[Try it online!](https://tio.run/##TVLPb9MwFL77r/BhSHAIEdIEUm@ldKNiXaMm5Tq58Wti4fgF@6Vd0MSfTnh2t2432@/L9@vFD/txmnp5DzSbfa@qYjYrq3m1Kx8Wm2/L8uMvGN9fPXx4err@9Dn7m1/l@Zd319O0QEfGDSDKk6G6Na6RhUfCGm0Qmx9i4UERaDGva@jj4R5dNh@oRW9IkTmCXLkD@o7P6HgqIyM4ElsIQJdboTwZZS/39WDJ9BbkokVTQxBrPIKWBTCTY4AdxQ0OTosSQG6oBc/cJNeozcGwjV2AaPRxFBV0PXrlR7kFbTzUJL4qzZffAwQSO6fObv/wV4UaOyZPQ4Zq1vB7ozW4xH5WXAPjtYwPc2vxlELzOTWg9hZEEpaxBSYzdYr@yvmsLCvTAQ4kOPLBGrZ1iw7EHbiG2ld0wY7RaZM4bpSxbxiWzE6jrBDlnfINvAyy3XZ1fkXXcMIw9FwBb0euuQIlq7G/YPlxq1wDKU/JVsPBpBDLx567Um91V7wb73hLJfgjeLn0Hs@9rzreVayOUbHdW/4pTmoUEcjrk9zykTkS8fPskj/@jPIn@BCVkosXu/@wj/JhytyU2SnzDihvifo8sLEh/Ac "Ruby – Try It Online")
Uses the length of the input to return the correct code for the three reason phrases not stored in the builtin hash. Credit to @Arnauld for the idea.
[Answer]
# [Python 3](https://docs.python.org/3/), ~~200~~ ~~190~~ 188 bytes Score:40
Thanks to pxeger for -8 bytes, ChartZ Belatedly for -4 bytes!
At least I didn't use a builtin :P this was an editor nightmare, couldn't copy and paste my encoded data correctly. I stopped working on this when it came out to exactly 200 bytes. I don't know what kind of black magic created dingledooper's solution and I'm afraid to ask.
```
lambda i:sum(e[1:(e.index(sum(i)&4095)+2):2])
e=[*map(ord,"ͅdޕšcʸ̙୧θӾ׈ت^ڪǼ̿ѲͯܕА]Ԃؿ΍͍ښԵୣװ̲Ɖ׃ݓࣣ܈࡫஗۩߾SׅϹݕיॽ")]
```
[Try it online!](https://tio.run/##TVTNaxtHFGdyi/6Khw5lt3GCVh92ItDBNU5qGifCknvZbGG0@yQN7M5sZmdlqceGQHoIFIopza2YUpqSDwKBFNoEemih2GlLAwpp0vo/cd/s2kannffx@/3ee/Nm05kZK9k4Cjs3jmKeDCIOop3liYO@13bwgpARTh3rEO57zdqllnuu7rbrgVvBjv9@wlNH6WipenA7@neX/XIv/P0Z2/@aHT74jr18xv5@zuZ32Ov7n7y5z377ie2/YH89YQeP2NvdM39@Ebz6jL1@wV7eZQd32Zt77NVTgu2x@WO2/4T9@jmb32LvvmSHe3vs7R12@M0P7PDhV@yf79l/z3vz2@yPH9m7XTYnqW9/ZlU3OKpE3EAHBtVq1avVYE1JI2SOFa/mQW9HmHAs5Ai6WhkVqjir1Cnp@kf08WBNIzcY0bkOq2GIaWk04JqS51dzGpAWhhsxQdiQQ6UTOitJGU3KKJRQGjJbsIUZmgXPMnS5NoLHp74GyW7msRFpjLA2ViLEjJwebKoJRtBFYpeUGM/IW4fLKpcRnRrQQ4TrZoyaLKtrCBGJoUAbbsF2hra5qYWtQB@TVGmuZ1RRJDSGptIk4Q94RI6bOWbW9mBb8rK7T4mlSXJdPktIvEgimHU2qAY9EFGEkqxSuayqSbKbSPiocK7GsdopIMulXUySD2Ik10pZHNhpkoAIixEu6lw8qQz6IkGV2wov2bENY2HL92pwRUni8jy4inJkxgtoj0qnLpWMRMF7mYu48DdOWddJ1cygrxRc5XpkiZonwfPbWxtlRMkRBWicMstTGiFtAvUYCQ79WWoxyycYCmxxOcKi1x61kw1F2ay3AuvTlGbOF2tp0fw3aAe0pG3ooZ6ghnWtlaaIV5BsJLQTdvxFdr24rSu0mDt8RnajANG62FubEGch1qIbOc45nVuL7uXDfr8LH6PObAVFhSft0PuwT4XTW3F8Z@o328HS1G83AhdotWEKQgLFL2RpLIwzqN6Q9LrcisaMEL4TOoOZwcwRfi1w3SXhe8dAcQzkAeXa1ClldDpCGhLxFtmJKqik2kbsf0Wj6x6bMUrHUpCjoFya2HyUeYKamrSp7cpZMQRJHU3oeLbEEaMvAvfofw "Python 3 – Try It Online")
The encoded data goes like this:
```
[Sum of description bytes & 0xfff,Numeric change in HTTP Code,Sum of ...
```
e.g.
```
[837, 100, 1941, 1, 154, 99, 696, 1, 793, 1, 2919, 1, 952, 1, 1278, 1, 1480, 1, 1578, 94, 1706, 1, 508, 1, 831, 1, 1138, 1, 879, 1, 1813, 2, 1040, 93, 1282, 1, 1599, 1, 909, 1, 845, 1, 1690, 1, 1333, 1, 2915, 1, 1520, 1, 818, 1, 393, 1, 1475, 1, 1875, 1, 2275, 1, 1800, 1, 2155, 1, 2967, 1, 1769, 1, 2046, 83, 1477, 1, 1017, 1, 1877, 1, 1497, 1, 2429, 1]
```
Here's the code I used to generate it (plus some useless vestigial code...):
```
dat = b"""100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported"""
data = ([(x[4:],x[:3]) for x in dat.split(b"\n")])
def e(d) : return sum(d)&0xfff
d2 = ([(x[1],e(x[0])) for x in data])
print(d2)
ol=[]
px = 0
for x in d2:
	ol.append(x[1])
	ol.append(int(x[0])-px)
	px = int(x[0])
de="".join([chr(x) for x in ol])
with open("de","w") as fh:
	fh.write(de)
ind=b"Non-Authoritative Information" 
print(len(bytes(de,'utf-8')))
ct=f"""\
d="{de}"
e=list(map(ord,d))
c=lambda i:(sum(e[1:(e.index(sum(i)&0xfff)+2):2]))\
"""
with open("decoder.py","w") as fh:
	fh.write(ct)
from decoder import *
res = [(c(bytes(i[0])),i[1]) for i in data]
re = [x[0]==int(x[1]) for x in res]
print(sum(re))
print(len(data))
for i,v in enumerate(re):
	if not v:
		print(res[i])
print(ct)
	
```
[Try it online!](https://tio.run/##fVRNc@M2DD1HvwKjQ1dqHY/lj2TrGR/STHab6abrSZxeHB9oEbLZkUmVovzRTn97@kjZrvfQnkQCDw/AA6jq4NZGD97fpXA0oWUcx1mvR/dGO6UbjrJeRi875fK10iuaWuNMbso66gP09Rd8Mrq3LBxLnPt0l@dctZcB/Wr09V0DfquccGrL9KgLYzc4Gw3EEIiQibXDdUTPXLO7sNzQVFinRHm2DZD2qSmdqkqm@7VROdcwZvRktixpymDXAJYHWPv0yTRa4jSgF2b66tZscfN5HSKkKhR794hea/bN7X3YLc14Uxkr7AEVSWU5d9EQiX8SEoY/Gq79PaNXLdru/gTLEOmm4rBB8gBCmDcOUINdKilZ49ZmbqsaIu0TI14G411Zml0IuWnvQUmxLBmm27Y48moigcqDhJd5Pp4qo5nasGl8hT962YpS@fKzHn02GlxZRl9Yr9z6IjpD6ejSaKkC7yehymAfnFkfkNUdaGYMfRF25YmGJ@f16/Nj6zF6BQfk1HVTQUJsAnqUStDsUPmYm1MMHM9Crzj0@oJ26kK1zWa39LCvoLm4rGUE/R@xA1ZjG17YbtnSg7XGwpMFkscNdsLLH9D9MK3PWMydOOA@CEFYFz@1LThDshEmcsScdRthLj/PZlP6jW3tKwgVntrB@4jwVATeSjJP9vPheNHZz8eDRUpYbdqT0gR/t65K5ZJl/KbjdJFGkgviRKY0JsuusZrqZoP7d719URSR7J/4skWH8ekt0m8JBUgqq7RLZD@NTDmZL6Jqj6he9C@sP46uTNkVVcVaBrL00uCjA/V1tYcjhJ9tKHESx93fjdLJPF/bZH9RgCkBwF9gTQZMSSw57sS7OCVRU7FG1mLd3eGVo0VOo0hpOVnG//v8Yzq2U4JveXBcI7TzoXHF9ccPaZpGuZsUEPstkpP4L8l/xxFPSlW7ZCOqxFjZkR40KcVmKQWpceIF5Xk2TriL/LwPBnVUOP2hn477EPUt8hP8tpfcSLbd6vBfPeUOPRXWbOiIJeX/D46@jyzXEHGe5MceVJhcR3npg3zqPD9gPdSLPZm0smeXWwOqxVETX7nlNL2QyFPAECg7W49n3WzYYnk9FOWqgjQ2dYvjVRsHxrnC4I40oY2r6P39Hw "Python 3 – Try It Online")
[Answer]
# [YaBASIC](http://www.yabasic.de), 195 bytes, score:40
```
h=0
for i=1 to len(c$)
h=h+asc(mid$(c$,i,1))
next
x=instr(")64rRz!\"VEjX(#3I	2nBAsfm=tC_TuUhid",chr$(mod(xor(h,1329),127)))
b=99
if x>2 b=197
if x>9 b=290
if x>17 b=382
if x>35 b=464
?b+x;
```
[Try it online!](https://tio.run/##bVJNb9pAEFWlXupLL1VV9TR1ORiFSOGjSVHlRgSRFDU0CEzUQ6Vq8Q54K3uXrtfE5s/TsQk2Ib3tm5mdefPmZWzOYuFvF0rDxm2CUdA5szQyDn5tG7hnVp4Ru0yI0vFrdStwgxMW@04keI0CDdFo1uuWxNRYqStkbLRjv6ifv@vot5PNh1/2/fvBn5/Ox/ab4avWS3n1uhcvItf0f3vJLBDcbviBrjmR4k6qtBM0mu1Wt95oti7q1HXudruWWED6tQVzt9m92IEugVb3bAeaF4Tan1s71P5EqHPesS7nJ@mX7aUNNKFW0IONZXFmGNh9JY2QCdqPePogjB8IuYSxVkb5Koz3qbvv@1efdDHI97Dn@7g6wD@UPO0lJlBaGGbEGmEoSb2I3kpWRZDPRmn2kQnGaI6DY6aNYOFxeJSERqxChH6ghI8lx5FaI4cx0jBJ5WG2T1yrRJYEp4hwZwLUFRkDI8XFQlRbzGLMNUjLFh5GK6WZzmCCXGj0SzZX5JIJ/k0wLkMzyXYKbKqOY5ZFRKoopf@84qbngnOUh3SeEB4h9eKQx3thqB4OtaZQoT@bh@UVC96Q34DmCb8Q/tnYR8bgiQhVUjInpRehqJa7UbLse4tyaYJnncYkhpJcFGOumQifDxkQD5OBpxTcMr3Eo/zpbDLcJZVcVhrGyYokJ2vBiCRn4GWr45@UmzC5xEKcKW0aL8ShFIN0RZdi/6E2JEdpSd6aol6jhoHW6okjhhE5LL9Y9Se/9A15/4FllZn0miwIdPE19T@c/Vh5rPA3zxvDPeo451TQ3q9pb/8B "Yabasic – Try It Online")
Well this bit of voodoo was probably the hardest challenge I've completed on Code-Golf! But here it is - a complete, self contained routine that recognizes all 40 codes, in 195 bytes, in good old-fashioned BASIC.
As genius as [@Arnauld](https://codegolf.stackexchange.com/users/58563/arnauld)'s answer was, I really wanted to come up with my own solution, not blindly copy his formula, nor just pull codes off the net.
An early attempt with 2 bytes per status code, based on a Pearson hash, bottom out at 238 bytes, and it became obvious I needed a hash table with a single byte per code. Worse, due to the vagaries of UTF-8 coding, attempting to use all 256 ASCII codes gave garbage out, so I was stuck with the basic 127...
I based my answer on the fact that the sum of the ASCII values for each code was unique, and I just needed to find a way to get a unique byte from each one. I ended up writing a seperate utility to generate hash tables, XOR them, test for collisions, and increment the XOR until each hash was unique. 1329 was the "magic number" I got. *Of course*, the result had to include a " so I lost a byte with the \ needed to add it to a string, plus an extra X to deal with that sneaky jump from 305 to 307.
I really feel I levelled up as a programmer on this one, and I hope you like it!
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/),
# 186 bytes, Score : 40 ~~41~~
```
S←18 22 53 56 38 91 76 83 98 11 31 86 90 62 40 47 25 80 72 5 10 99 85 24 2 68 52 96 77 19 9 65 4 87 33 36 57 16 49 28 41
C←{(∊⍳¨⍵)+⍵\100×1+⍳5}2 7 8 18 6
f←{C[⍸S=∊⍎2↑⌽⍕8-⍨|-/∊⎕UCS¨33⍴⍵]}
```
I made a very sketchy "hash function", that is so hobbled together it will only work for these messages.
```
{⍎2↑⌽⍕8-⍨|-/∊⎕UCS¨33⍴⍵} 'Foo Bar'
33⍴⍵   ⍝ 'Foo BarFoo BarFoo BarFoo BarFoo B'
∊⎕UCS¨ ⍝ convert to UTF8 numerical array 70 111 111 32...
|-/    ⍝ |70-111+111-32...|=104
8-⍨    ⍝ 96
⍎2↑⌽⍕  ⍝ 69
```
Rehydrating the Status Codes
```
{(∊⍳¨⍵)+⍵\100×1+⍳5}2 7 8 18 6
100×1+⍳5 ⍝ 100 200 300 400 500
⍵\       ⍝ 100 100 200 200 200 200 200 200 200 300...
∊⍳¨⍵     ⍝ 0 1 0 1 2 3 4 5 6 0 1 2 3...
+        ⍝ 100 101 200 201 202 203 204...
```
Lookup Status Code
```
C[⍸S=∊Calculated_Hash]
```
[Try it online!](https://tio.run/##ZVLLbtNAFN3nK84uIBQR2/FrwaJEbYloSJQHG2AxjSfJSM5MGE/SBui2QohUsKj4he4LEhs25U/8I@HasZWmbOyZM/dxzrmXzeNatGKxmmzSq@tWJ738Vt/06WsFsG24DlwPToDQgu8hcBAGsCw4FgIPYR2ejUYdDR@2i6AOn1Jg1RGGCFzYDdjwArg2Qg@@DytECM9FA4EPx4HjwSXUQyOEHaBhVZrU@uOj9POXdH17d5Oufz1@Qp@3Vr3@94dFx1v3woYPIhHAq4yz6OabdP27/yzPubLTy@/p1z/p@jqopeubT7WnGX51PWz2724cJ13/pHLvLiqbzRjVppJGyAWvokK3/pkwo6mQE3S1Mmqk4qSa4Z2X@a@pOTM8ys8HoxGfZ5c88ZWStYOFmSotDDNiydGSY6VndFayDEHWjEuzvfd4ws0@1GXaCBbvg@1FbMQ85mhOlRjxpEDVkkfocmohKTRebeEjtZAFpT7n6Jgp12V7g7aKxFiUnIcJz2Ser@5rL5AMGPDZXGmmV@jxSGg@Kgg9ZxEh7xc8KYChZFvpH8rSXbaaEas8jDKjkpw@FVHE5Y7RPb5tTjUiZOhBHKuznbUE5Gaz07iYU04SmeHURYxylx80KxhiIGZcLQqmZOw4FqWQYyWLeidcTsz0QYUuSVYyEnnxIybih6UPqbdZYaAUTpie8L3X2rDX2j4pOSl9ShZzspS2Bm2ylGGwmu9n0UuPyQnPbeiTrmQsdrIPz@c0BfYfoRati5a0OH2ul1zjUGt1b@ytGa1PNo8yPpvgMW3yGStnT3m0W6BJLqnurmMRte/ii8Ggi9dcJxmPnGgpq1qpVP4B "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 123 bytes
```
⎕FIX'file:///opt/mdyalog/17.1/64/unicode/Library/Conga/HttpUtils.dyalog'
f←{⊃s⌿⍨(⊂⍵)≡⍥(⌈~∘'-')¨⊣/⌽s←HttpUtils.HttpStatuses}
```
No builtins that do this exactly (as far as I can tell) but luckily the statuses are stored in Dyalog's HTTP utilities.
[Try it online!](https://tio.run/##TVK7bhNBFO3zFbdzUpj1@hVAFIQoD4uEWLGDKGgm3mt7pPXMMjt2YqKkABQlJo5okKgQDyGlRzRICIlPmR8xZ3ZxcLV7X@ece@aKJC5GYxHrXpGPLauIo9nMXb/fbDwrdGXM94Mg0IkNBnlTEK7eCYN6NRgq2dERBzvy0AgzDta16olg29rkwMo4vZO3F5a67vzdiZu8Tt3Vbze9WXaTV276Y8VdfnbTb8vu6uLMXXwoFAsrf27c5Gvgrn6lmPiP4/9aVthhyunp7MRzkhIDRpObXmMW2A9DN/lSoMIJkN3kHDRnD56fuelPd/kJqVM3/Uju7RvCWhjzEKDvZjCnoJ1@r5ZmYSmk1pG0nb5UPWoabXVHx@lSuVSivcf4hLRuWFiO8F@mtU6Hkzyo0BOtimtD29dGQqkcMTVUV5sB/rVCRxUdBINgr0VYo31O2S5k6tQUxkoR3@YqoN0dxlYmMdN6X8sOp0iGtKtHHFGTga7QGI@RLdOmHqoIfxVqMdOe7bNB5HktJiLZlezLNTpI2S937MdWqc2DRPvng6JIGu7YpSqIH4kIiRdDTn0c0oES@XYvgVIFXVOMByDPmjDmkxVoMIcyilghyplzVVXQ7jLmoyy5Fsf6KBup53HmpDiMGanVXBx5N0EgO5mFizx358qoLQesh17hPW9bN5ZefliiLa2AFYa0w6pn@wvTIaRjS60imeFuCly4z1duUTfAasfU1pp2hOl5oOq8WDzYb@QVHDsKsFOlwwQW4hKwYyQFtceJn6nPZ1DYF6rH2a4trJN2Zb5suEobxwk8F4taavC/gRswCtfQYjNiQxvGaINKmIE0BrgJb3/WXc5eawuHeSTGiCvZEM7Fv9oImBlZDS/yr@fWtxreZbvdbtJTNqlXkCmcr/MX "APL (Dyalog Extended) – Try It Online")
[Answer]
# c# 9, 101 bytes.
```
System.Console.WriteLine(args.Length>0?(int)System.Enum.Parse<System.Net.HttpStatusCode>(args[0]):0);
```
[Answer]
# Java EE, 111 bytes, score: 40
```
s->javax.servlet.http.HttpServletResponse.class.getField("SC_"+s.toUpperCase().replaceAll(" |-","_")).get(null)
```
[`HttpServletResponse`](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletResponse.html#field.summary) has public fields for all the statuses prefixed with `"SC_"`. The names, however, are all uppercase and spaces or dashes are replaced with underscores. The values of these fields can be obtained dynamically using reflection.
[Demo](https://www.browxy.com#ALIEN_109694)
[Answer]
# [Zsh](https://www.zsh.org/), ~~197~~ 187 bytes, score 40
```
>`sum`
F()for a {let n++;ls|grep -q $[32#$a]$&&<<<$n&&bye}
for b (5SOO E3HOIOTU3P5PJL 1K82FFFCPFC5JIQF 3AIQ9M13UPUUQ0PR9RBUIAHSNOF8M32QLT2H C2Q1BISP3DKE)n=$[m++]99 F `fold -2<<<$b`
<<<201
```
[Try it online!](https://tio.run/##jVPNbtpAEL77KUaqRaAICduQhAYqEYrBCQQDphcaCWMPsJLZJWsDgTTP0EvVUx@kz9MX6CPQWVPSSL2Ui3d@v2@@Gfbx4tDK5rLZw/tJvF5ONDubmwkJPjxFmADP56@i@PNc4goKD6CPLfON7t/rmUy1WtV5JjPd4bOmCqaQLQ97PWha7Z7T80aWW3ZvOmDcXpq2bTdcu1G@cfo2WHWnX@ka1sgdjfpFd1AZXI@cent417Mvu5bZ73hmGxpm37h2hq714baZ4zV9vMzn7ysVsGEyE1EIBVPBTycafcyicchpcglvtZy2XbAIQaIfAsJeC4U2r01aKnk/0dgMxmPQEWqgz@H@Hp4wWAjlIFPfw8/vX3/9@HKl5vby@WfAKMZ/c75RzjN15litNjWjWISG4AnjayTDgOGWJcGC8Tm4UiQiEFGsmZTUu6WPAQ3ilmBIbxPqQYCro2HBneCF@jpZCMkSP2EbBIeTrkt6C04ZJcpIkZAnZJZhgDER/es5B9eXCfOjF59FsN11lLAVadJYCBZgTE4DumKDIbhI3TklRjvymmCLNQ/pZcEQEXrJAiVZCjehipDNGKpwGUYkCw33qMouwMPlSkhf7ohRyCQGiVYi4GtawQAf1hgr24AR94/T7alLieBcf7ck8DSJypTTIg5yysIQOVlH5COrEsF2kerD1FmPIrFNS86PdqqkP42QXBdHcqDUJAAWpBK@xrk8MQOPLVGsFcOKkm0WMUXfKEKL9ksPAzrI58niVbVB1GlKwUOW9rV9Ojnlt166Ngk12YEnBHR8OVeNSqdgYTRwjhHB5xQgOXm8XpGEdAk0Y8h88HYrVXN@qqHAwOdzTGcd0jjxjB2HNS6g@bgizf3XXMqkv0M3IDldwxDlBiU0pRSSIkbaxFnSTSj502wz3VaLDnPr78i20iI6F7W1DfVMwcq0kT85L7qVaS9tz3PhI8pYMUgZnsbRmpr6h57V/ud3plKHgZD47hPo3uE3 "Zsh – Try It Online")
Can probably be a fair bit shorter, but I'm not really with it right now.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 41 bytes
```
+[net.httpstatuscode]($args-replace" |-")
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/Xzs6L7VEL6OkpKC4JLGktDg5PyU1VkMlsSi9WLcotSAnMTlVSaFGV0nz////SkGphaWpxSW6oUGeCiH5@Qo@@XnpSgA "PowerShell – Try It Online")
Cheap builitins, again
-7 bytes for @ZaelinGoodman
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 133 bytes, score 40
```
f=(t,i,c,s=require('http').STATUS_CODES[i])=>s==t?i:i>999?0:(g=_=>s&&s.slice(--j)==t.slice(j)?g():j)(j=0)>=c?f(t,-~i,c):f(t,-~i,j)||i
```
[Try it online!](https://tio.run/##XVRdb9owFH3vr/BTSSRAUKAbVAExRju0MhCEvVRV5SaXYBTs1HZo2br9dXZtHFh5S865H@fec5M13VIVSZbpChcx7PfLwNNlVo7KKpDwkjMJXmmldVbyq/OwHy7mT4PJ1@H8gT36QVcFge6xDuu22@1ereMlwROCl5eqqlIWgVeprH0McW9rv5d4fmfte@ug5neDqLfEXpW/2M3vFI9r//2d7SfPa4h0FbiWDJT3@4KQeq3WIaWB4JrxHEplC9URmr8yHa0YT8hUCi0ikSrLXtmEyXf3YkIHEqiG2CFXiPSjCLIT1EDoh@CVfq5XQjJNNdsCGfGlkBt8FtzFNW0cMWpQowNbCM5AgT7DrxGfUqkZTT8wDStwnKeaZSmQwUrglpSjjNyx2EJMpoC9OSalO8cZ4bci57F7N6rnAGSiVyAddlCoyVjEbMmgCDUaFwrMqt6Kcp8QC2GTCUnljswgRtOjg8SmlfiFxgi/5KAK1KhbcHrY0i9XvWmFTelug2JtAhYqqIbVLJ9ZHAN3WKHxNEvTChwD1o2JofppKl6PRa5dwsE1@pyCI8wIdiRinMP2LLJ2nav4bC2yk5CQbUDkxUTtw3Et8VIdVDej3wnuetTNzPfAE706q1q3Y@POBI@Z7XpLWXpkG//1HKIyvSOhEOSeyqQo3TyFVBaz0YEXPHG0NY2rPEOL8FbJGC2iJNxlRf71KR/pGeUJ2O3NcQlqyU6LqptFDd8y9JeeK21Zr0d4n5Ljpc5BbkGSoZRCOr7u1j/a4L0ak4@ZV@5K7vDzeqU7hx7uUm7xrAleyxZ7HaW0rPsu/oMXLXsD38JwSn6CVEalnaUYv3Txx6/iBzmk0crzHiL8bZWJhjf96JOgS8y/Ap1QIoVqKhIPfyzI@WXiHkgQEJPj32Cdm/0/ "JavaScript (Node.js) – Try It Online")
I have no idea why it is so complex. But it at least works within 200 bytes.
---
# [JavaScript (Node.js)](https://nodejs.org), 54 bytes, score 37
```
f=(t,i)=>require('http').STATUS_CODES[i]==t?i:f(t,-~i)
```
[Try it online!](https://tio.run/##bVRNb9pAEL3zK@ZSYatAQ4C0TeRUlJIUNQQEppcoqjb2ABuZXWe9JqFV@tfp7HoNBeVk@83Xm3njeWRrlkWKp7ouZIzb7TzwdI37waXCp5wr9KpLrdOq35iG3XA2/dUbfetP7/h9EOgv/HxOzvW/3N9GUmQaskgqhAC6SrFNY67kyhs9PGKkGyi04ph5fyoAzZOTc6j2pNBc5FitWahJ0PSZ62jJxQLGSmoZySSz1lMbMPrhPoxrTyHTGDvklJBuFGG6h1oE3UpR7@Z6KRXXTPM1wkDMpVrRuxTOr239wLAhjg7sEDjBDPURfkb4mCnNWXJgaVmCwzzRPE0QekvJI8ycydAdyjXGMEaqLSgo2TibIX4lcxG7b8N6iggjvUTlsIKhhqGM@Zxj6Wo4zjI0o3op030kLMRVKhVTG5hgTAJGBcW2pfiVxQQ/5ZiVqGE3E6yY0m@XvW2JjdlmRWRtACUqTS3LWT3wOEbhsJLjvpe2JThEyhuDMXWTRD7vkpy5gEI19pCgM5gWbEtglKPyPLJyHbP4ZCWynUDIVyjzsqPPxXLNE1623jStX0vhajRNzzcoFnp5lLVp26aZSRFzW/WK8WRnbf1Xs0/M9AZCKeGGqUWZur13qc8mg8IuxcKZrWgiy1OSiHYVhiQRg3CTlvFn@3gyT5hYoJ3elIaQzfl@UE0zqP5LSvqyY6Ydq/WA9lMJ2tQpqjUq6CsllbM33fgHK9pXI/Iu8tRtyTX9Xs9s49BiL9Wa1hpoW9ZUa0elY9V3/gdadOwOfA/DMfxElRmWtpey/Wrl1fcbNP08Qs@zx6MGdxHdoRpofNH3PgSXYE6GpnU2TwBzaGSCjUQuPLo@5OXXwL1AEICJ9i@sq0KdK@GO0nvw3vJ6BVqvaAke@m8UqN5@6FYpPUsy9I135TDrReW1BieUqHIQ9S6GVHKh6QIUfv72Hw "JavaScript (Node.js) – Try It Online")
[Answer]
# JavaScript, 63 bytes (Node.js), score 36 for some reason
```
n=>Object.keys(a=require('http').STATUS_CODES).find(e=>a[e]==n)
```
Works with ES6 and above.
[Answer]
# [Julia 1.0](http://julialang.org/), ~~143~~ 135 bytes, score 40
```
x->Int["Ƙ...Ĭ..ƙ.ƞıƕƐƛ.ǵƚ.ÎĮįƜĳǷÊƒdĭƠÌƖǶơÍƔǸÈƑǴƗƓǹƟËÉe....Ɲ.İ"...][sum(Int[x...])%217%159%117%54]
```
[Try it online!](https://tio.run/##TVPbTiNHEH33V5QsIRktjBhfIDwYLYuARYFggckL4WGYKdu9GndPenrAjvIBe9dmN/fsJpv3XJXNZZ9ttT@LnO7hNpLlrqpTdU5VVz8oUhGFo4te@2K0uLYjzXHVfhsEwfSXILDfBfbH6Z/2K/vC/hDM/rbfB5Pn09@mv9vX079m/04e25fJ9Ff7dvLUfj37x/48eWa/nP03eWi/mL2z39hXs/f2p8mTySNGvcC@CaZ/VHE4Oc6LYc0xjZw1P1cPV@bC1upciP9W8@TCcG5yalO1Wq2ES0u0oaQRsmAYIR2eCxMPhOxTRyujYpXmlTpA@x/iL6QNzZHhBOc6rccxZ6XRoI@UXFwvzEBpYSIjzph2ZE/pIc5KAtEEwjOxNDBbdMA5m1ueZepE2ogovfY1QLtXpEZkKdPGQImYczhD2lNnnFCHUV0CmI7hrdOWKmSCU4MOmWnfDFjDcrwGGYnoCXbhFh3l7JobubQV6vIwUzrSYyhKhObYVJogvhclcHxaYFawQzqSUdndZ6jSBF0nGg9B7kFIc84GNOhTkSQsYZXMpaomaPcY@Yl3rqepOvcpy6XtJxmdpgzXSimO3DRBIGI/wts8H1wpo64YsiqcwlU3tl4qnPxwibaVRK0wpF2WfTO4lR1COrpUMhG@7lYkUu9vXFfdBKsZU1cp2o103xVqXgUXjw52yoiSfQQwTpkXGUaITUCPiYioO85czvJVDgIHkeyz7/UQ7eQ9UTYbrtDmKMPMo9taWpg/9pe1xDYcsj5jTZtaK41I6IvsDLETbvweXfe3tY3FPI/GsBs@Cevibu0MNT1ZCzdyibmeWwv3cr/b7dDHrHOnwCu8asc9kEoeK814LUuVCvaZ3OMhISnPUmFq/iktUPUTWZ2vEL5YJbwA0Mgg5QazQKkYCtOulyjNOfYaiF7NQefp8zX4Mu2Doncdb/t63uu@fqpOMZFS0Z02hT7CaX4DybTAg5C12o2Qhcty8yU3Yx3dr3I3H6jzstjF/w "Julia 1.0 – Try It Online")
it could probably be more golfed but good enough for now
[Answer]
# Java, 32 bytes
```
n -> HttpStatus.valueOf(n).value()
```
Using Spring. Plus a couple of megs of libs!
[Answer]
# [R](https://www.r-project.org/), ~~131~~ 128 bytes, score 40
```
`-`=utf8ToInt
c(408:417,0:7+100*1:5%x%!!1:8)[-"+41i@N!>Q      
-bTE6 ;?J85
 M0IP)F/^]3G*  "==sum(-readLines())%%217%%124]
```
[Try it online!](https://tio.run/##TVJRj9JAEI6v64PRBxNfdDhDQu@OSE9OCBdUJIDo9a5C0Qdz5pZ2CpuU3brdAtX423Fa7nr0aXfm6zff983qXdgNU@kboWQtseAvaOTBpZCYQBfKjpXAa/iheRyjhlBpMJgYIRe72/ptNzVh21NjaZhfazbanabdOm10Wid2o3Fsd86r22qlYnfa1s/60aOTpv1EfLx6Xnn/DYrvZf3Z3Bu8g4sPX9rnj8FpjF1r@ObVr5u3L56OjgGOut0kXdXqpayaZVWrZ3arWrXPmje7f8zhcS08PeyzvpKkLkU23QjjL0kouFoZ5asoYddfWZ/QBgPW832M88OVkvVeapZKC8ONWCOMJdlc8dw9dSFnRHI4wQRNeXO5NoJH5d1JIyPiCKG/VMLHhDlqjQG4SEySAFHGhiqVAZsiwrVZoiZuA44KRChIxizBXOg2Yx6uYqW5zmCCgdDoG/aJB3T5nVLybCb5Xu0f@svl2YrIiyZBA5qh5yIIUBbs@4kOEj6AvNCLIrUpTNO5SIDPI2TFYMhTIDLhF9YfOO8mgydWqFKTRxxGgmSNlER2iXJhlg9olxQrGYiCY8hFdMAwIHaTgacUXHK9wPtGfTYZ76tKLshhksYUAW0HHIqAg5fFJZaKEy4XWPiZktQkFIWJwTamrPjhXHqYqCVtaYp6Tc93oLXa5z5e0a7y6AiVpzuiR7HhGcuBtD6glNfEURDf9Ur/nz3Phe@ok3xSoeJe7u4/ "R – Try It Online")
Unlike many other answers, this one isn't really based on some "magic formula". Here we use modulo hashing simply to convert the byte sum of the input to a unique checksum and then to make it fit within ASCII in order to avoid multi-byte characters (albeit with some unprintables). The lookup string is then just a catalog of these checksums.
Finally, we return a value from the vector of status codes at the position where the checksum matches. The status codes themselves are completely unencoded: Initially, I just used a literal concatenation of relevant ranges `c(100:101,200:206,...)`, but then managed to squeeze off a few extra bytes by declaring a "structured" range encompassing the values `x00:x07` for each hundred. However, the savings are rather modest, as we now also have to fill the lookup string with dummy values (whitespace) for missing codes.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E) + [Plug](https://hexdocs.pm/plug/readme.html), ~~30~~ 29 bytes, score 40
```
l„ -'_º‡…ƒË :”§¬.¡¤n.‡‚.”rJ.E
```
Beats all other answers. No TIO link because the module (`Plug.Conn.Status`) used here is not on TIO.
```
l„ -'_º‡…...”...”rJ.E  # trimmed program
l                      # push...
                       # implicit input...
l                      # in lowercase...
       ‡               # with each character in...
 „ -                   # literal...
       ‡               # replaced with corresponding character in...
    '_                 # literal...
      º                # concatenated with...
    '_                 # literal...
      º                # reversed
        …...           # push "code :"
            ”...”      # push "Plug. Conn. Status."
                       # in title case
                 r     # reverse stack
                   .E  # evaluate...
                  J    # joined stack...
                   .E  # as Elixir code
====================
Plug. Conn. Status.code  # full program
Plug. Conn. Status.code  # return HTTP status code with given name
```
]