204082026-01-06 17:50:59algoproMorze (60 pont)pypy3Runtime error 0/6075ms22876 KiB
# UUID: 7f82b19a-3b86-4abb-9cf5-d81653f87605
morse_to_num = {
    "-----": "0", ".----": "1", "..---": "2", "...--": "3", "....-": "4", ".....": "5", "-....": "6", "--...": "7", "---..": "8", "----.": "9"
}
morese_in = input().strip()
res = 0

for i in range(0, len(morese_in), 5):
    chunk = morese_in[i:i+5]

    if chunk in morse_to_num:
        res += morse_to_num[chunk]

print(res)
SubtaskSumTestVerdictTimeMemory
base0/60
1Runtime error0/065ms22824 KiB
2Runtime error0/072ms22732 KiB
3Runtime error0/365ms22876 KiB
4Runtime error0/372ms22752 KiB
5Runtime error0/374ms22808 KiB
6Runtime error0/375ms22720 KiB
7Runtime error0/364ms22736 KiB
8Runtime error0/364ms22656 KiB
9Runtime error0/472ms22760 KiB
10Runtime error0/465ms22804 KiB
11Runtime error0/471ms22776 KiB
12Runtime error0/764ms22764 KiB
13Runtime error0/764ms22756 KiB
14Runtime error0/864ms22760 KiB
15Runtime error0/871ms22676 KiB