186862025-10-30 15:14:32VizsimiMorze (60 pont)python3Accepted 60/6017ms3088 KiB
start = input() + "x"
morze = ["-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----."]
end = ""
current = ""

for i in start:
  if len(current) < 5:
    current += i
  else:
    for j in range(0, 10):
      if current == morze[j]:
        end += str(j)
        break
    current = i
print(end)
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/016ms3064 KiB
2Accepted0/016ms2884 KiB
3Accepted3/316ms2868 KiB
4Accepted3/316ms2868 KiB
5Accepted3/316ms2864 KiB
6Accepted3/316ms2868 KiB
7Accepted3/317ms3008 KiB
8Accepted3/316ms2892 KiB
9Accepted4/417ms3064 KiB
10Accepted4/414ms2956 KiB
11Accepted4/416ms3088 KiB
12Accepted7/716ms2976 KiB
13Accepted7/716ms3056 KiB
14Accepted8/817ms2868 KiB
15Accepted8/817ms3064 KiB