Overview
The sharpness of a word is the sum of the sharpness of each of its letters, using the following rules:
Sharp letters
A
, andV
each have a sharpness of 1N
andZ
each have a sharpness of 2M
andW
each have a sharpness of 3
Dull letters
C
andU
each have a sharpness of -1S
has a sharpness of -2O
has a sharpness of -3
All other letters have a sharpness of 0.
Example
The word SAUCE
has a sharpness of -3 since the A
contributes 1, the U
and C
each contribute -1 and the S
contributes -2.
The word MAZE
has a sharpness of 6 since the M
contributes 3, the Z
contributes 2, and the A
contributes 1.
Task
Given as input a string containing only uppercase letters*, determine the sharpness of that string.
*If you wish, you may instead take the input as a string containing only lowercase letters. Other common input formats are also acceptable (eg. a list of characters, a list of codepoints, etc.)
Scoring
This is code-golf!
Test Cases
CODE => -4
GOLF => -3
SAUCE => -3
CATS => -2
MOON => -1
NONSENSE => -1
ZUCKERBERG => 0
STRING => 0
CHALLENGE => 2
NAIL => 3
CARNIVAL => 4
COMPLIMENT => 4
WAVE => 5
UNKNOWN => 5
MAZE => 6
Extra test cases (Provided by @Surculose Sputum)
MIZZENMASTMAN => 17
PNEUMONOULTRAMICROSCOPICSILICOVOLCANOCONIOSIS => -26
MANAGEMENT => 12
CONSCIOUSNESS => -13