# [C (gcc)] pre-processor macro, 146 bytes <!-- language-all: lang-c --> <pre><code>char*p="(3$,?2'+";D[]={0,5029,9169,17003,72042,136669,281564,444309,584847};	 #define E(x)D[strchr(p,*x^x[1])-p] #define f(s,t)(E(t)-E(s))*10000LL </code></pre> [Try it online!][TIO-jcyq68os] [C (gcc)]: https://gcc.gnu.org/ [TIO-jcyq68os]: https://tio.run/##PY5ha4MwEIY/118R0pUl7hxRo624dl/ql9HuD4gDiakKnYQkQkfpb3exZTsO7njuvfdOBK0Q07IfxHlsJHozVvdD@9rtJtHV2ldbTOIneI@eX3C@L6vtlUHCogyyMM0gXDMWwzpiPIIwTlOHok2YpBw45zHLINnwDV/f8oW3bOSpHyQqyIXuS3dFdJoo8C9flzKsaKCqf8mJGLCUFMTSoCCGUj9kLg6HqSXzU8g3gB6Npd7VWyj3sj0RvDLIZbBDq/O5wYCczMLdDllKc6RGawjGNPdunudW0HfdD@Ru0RJ8lFqM@gcDPtbazKqZfkplx0E6@jGq3kr9NyhqbTuHH3X2nH4B "C (gcc) – Try It Online"