New answers tagged

0 votes

Fastest Gematria calculator

Python, 75 bytes lambda a:sum((c.isalpha()*(n:=ord(c)-97)%9+1)*10**(n//9)for c in a.lower()) Attempt This Online!
  • 3,390
1 vote

Fastest Gematria calculator

C++ (clang), ~44 ms on my Linux machine ...
  • 19k
0 votes

Fastest Gematria calculator

Julia 1.0, 142 bytes ...
2 votes

Fastest Gematria calculator

APL (Dyalog Unicode), 120 ms on my machine Full program. r←Gem t r←+/1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100 200 300 400 500 600 700 800 0[⎕A⍳t]
  • 28.5k
0 votes

Split along groups

Raku, 28 bytes ~«*.split(/\[<(\w*)>\]/,:v) No TIO link, because the version of Raku/Perl 6 found there appears to have a regex bug. All of the test cases ...
  • 6,056
1 vote

Decipher a squashed sequence

Raku, 44 bytes {+«m/^(\d+?)+<?{1==all $0[1..*]Z-$0}>$/[0]} Try it online! The regex match m/.../ does the heavy lifting ...
  • 6,056
3 votes

Decipher a squashed sequence

Prolog (SWI), 68 64 bytes -4 bytes thanks to Steffan pointing out a golf I somehow missed A+B:-nth1(X,_,_),between(1,X,Y),numlist(Y,X,B),concat_atom(B,A). Try it ...
  • 46.4k

Top 50 recent answers are included