111332024-07-07 13:28:16probaMorze (60 pont)python3Accepted 60/6018ms3096 KiB
# morze
#m = ['-----','.----','..---','...--','....-','.....','-....','--...','---..','----.']
#fsz = ".....--...---.."
fsz = input()

for i in range(0, len(fsz), 5):
    jel = fsz[i:i+5]
    #print(jel)
    if jel.count('-')==5:
        j = 0
    elif jel[0] =='.':
        j = 5-jel.count('-')
    else:
        j = 5 + jel.count('-')
    print(j,end='')
    
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/017ms2980 KiB
2Accepted0/018ms2972 KiB
3Accepted3/318ms2916 KiB
4Accepted3/317ms3060 KiB
5Accepted3/318ms2960 KiB
6Accepted3/317ms2916 KiB
7Accepted3/317ms3044 KiB
8Accepted3/317ms2960 KiB
9Accepted4/417ms2824 KiB
10Accepted4/417ms2916 KiB
11Accepted4/417ms2916 KiB
12Accepted7/717ms3096 KiB
13Accepted7/717ms2844 KiB
14Accepted8/818ms3068 KiB
15Accepted8/817ms2916 KiB