#include <assert.h>
#include <stdlib.h>
#include <string.h>
//
// Created by xfj12 on 2025/3/24.
//

int scoreOfString(char *s)
{
    int score = 0;
    for (int i = 0; i < strlen(s) - 1; i++)
        score += abs(s[i] - s[i + 1]);

    return score;
}

int main()
{
    assert(scoreOfString("hello") == 13);
    assert(scoreOfString("zaz") == 50);
}
