Damaged SOS Signal

A Mars rover repeatedly sends the same signal, SOS, but some characters may be changed during transmission. The function mars_exploration receives the received string s, whose length is a multiple of 3. Compare it with the expected repeated SOS message and count how many characters are in the wrong positions. Return the number of differences.

Примеры

Ввод
"SOSSPSSQSSOR"
Вывод
3
Ввод
"SOSSOT"
Вывод
1
Ввод
"SOS"
Вывод
0

Нужно реализовать

def mars_exploration(s: str) -> int:

Теги

strings
PostgreSQLv16

Tutaj pojawi się wynik wykonania kodu

Visible tests
1
Input
"SOSSPSSQSSOR"
Expected3
2
Input
"SOSSOT"
Expected1
3
Input
"SOS"
Expected0
4
Input
"SOSSOSSOS"
Expected0
5
Input
"XOSXOS"
Expected2
6
Input
"sosspssqssor"
Expected12
Focus radio
Paused · SomaFM · Fluid