17542022-12-02 19:31:44kdbMorze (60 pont)cpp11Accepted 60/603ms3752 KiB
#include <iostream>
#include <map>
using  namespace std;

int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);

    map<string, int>m;
    m["-----"] = 0;
    m[".----"] = 1;
    m["..---"] = 2;
    m["...--"] = 3;
    m["....-"] = 4;
    m["....."] = 5;
    m["-...."] = 6;
    m["--..."] = 7;
    m["---.."] = 8;
    m["----."] = 9;
    string p = "abcde";
    string s;
    cin >> s;
    for (size_t i = 0; i < s.size(); i++)
    {
        p[(i) % 5] = s[i];
        if ((i+1) % 5 == 0) cout << m[p];
      }
    return 0;
}
/*
.....--...---..
*/
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1892 KiB
2Accepted0/02ms2080 KiB
3Accepted3/32ms2292 KiB
4Accepted3/32ms2360 KiB
5Accepted3/32ms2488 KiB
6Accepted3/32ms2596 KiB
7Accepted3/32ms2792 KiB
8Accepted3/32ms2876 KiB
9Accepted4/42ms2876 KiB
10Accepted4/42ms3096 KiB
11Accepted4/42ms3204 KiB
12Accepted7/72ms3408 KiB
13Accepted7/72ms3484 KiB
14Accepted8/82ms3488 KiB
15Accepted8/82ms3752 KiB