202021-01-07 21:44:11mraronMorze (60 pont)cpp11Accepted 60/602ms1892 KiB
#include <bits/stdc++.h>

using namespace std;

string code[]= {
    "-----",
    ".----",
    "..---",
    "...--",
    "....-",
    ".....",
    "-....",
    "--...",
    "---..",
    "----."
};

int main() {
    string line;
    cin >> line;
    for (int i = 0; i < line.length(); i+= 5) {
        string item = line.substr(i, 5);
        int num = 0;
        while (item != code[num]) num++;
        cout << num;
    }
    cout << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/02ms1736 KiB
2Accepted0/01ms1780 KiB
3Accepted3/31ms1836 KiB
4Accepted3/31ms1848 KiB
5Accepted3/32ms1844 KiB
6Accepted3/31ms1852 KiB
7Accepted3/31ms1860 KiB
8Accepted3/31ms1860 KiB
9Accepted4/41ms1864 KiB
10Accepted4/41ms1864 KiB
11Accepted4/41ms1876 KiB
12Accepted7/71ms1872 KiB
13Accepted7/71ms1880 KiB
14Accepted8/81ms1888 KiB
15Accepted8/81ms1892 KiB