232021-01-07 21:53:04mraronKövek (100 pont)cpp11Runtime error 0/1002ms1940 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
base0/100
1Runtime error0/02ms1760 KiB
2Runtime error0/02ms1900 KiB
3Runtime error0/51ms1828 KiB
4Runtime error0/51ms1836 KiB
5Runtime error0/51ms1840 KiB
6Runtime error0/51ms1852 KiB
7Runtime error0/51ms1848 KiB
8Runtime error0/51ms1860 KiB
9Runtime error0/71ms1856 KiB
10Runtime error0/71ms1868 KiB
11Runtime error0/81ms1868 KiB
12Runtime error0/82ms1880 KiB
13Runtime error0/81ms1896 KiB
14Runtime error0/81ms1892 KiB
15Runtime error0/81ms1920 KiB
16Runtime error0/81ms1928 KiB
17Runtime error0/81ms1940 KiB