Skip to main content
added 124 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

C (gcc), 8888 87 bytes

Saved a byte thanks to ceilingcat!!!

char*t="O_S_CU__AVNZMW",*i;v;f(char*s){for(v=0;*s;v+=i?(i-t)/2-36>>1:0)i=index(t,*s++);v=v;}

Try it online!Try it online!

C (gcc), 88 bytes

char*t="O_S_CU__AVNZMW",*i;v;f(char*s){for(v=0;*s;v+=i?(i-t)/2-3:0)i=index(t,*s++);v=v;}

Try it online!

C (gcc), 88 87 bytes

Saved a byte thanks to ceilingcat!!!

char*t="O_S_CU__AVNZMW",*i;v;f(char*s){for(v=0;*s;v+=i?i-t-6>>1:0)i=index(t,*s++);v=v;}

Try it online!

Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

C (gcc), 88 bytes

char*t="O_S_CU__AVNZMW",*i;v;f(char*s){for(v=0;*s;v+=i?(i-t)/2-3:0)i=index(t,*s++);v=v;}

Try it online!