cswork / OA打开练习工作台

PaypalOA #1

Similar Password (Singapore)

简单可在线判题

考点(AI 标注)贪心调度字符串

Change a lowercase password one character at a time by incrementing or decrementing a character by one, so that the number of vowels equals the number of consonants; the vowels are a, e, i, o, u.

输入格式

One line containing a string of lowercase English letters. This site only accepts even lengths 2..100000.

输出格式

Output the minimum number of single-character increment/decrement operations.

样例 1

输入:

aabb

输出:

0

样例 2

输入:

zzzz

输出:

10

样例 3

输入:

yybb

输出:

2