197522025-12-21 14:37:04GergoszaboMorze (60 pont)cpp17Accepted 60/601ms508 KiB
#include <iostream>
#include <bits/stdc++.h>
using ll = long long;
using namespace std;

int main()
{
    string s; cin >> s;
    //map<string, ll> m;
    vector<ll> ans;
    for (ll i = 0; i < s.size(); i += 5){
        string help = "";
        help += s[i]; help += s[i+1]; help += s[i+2]; help += s[i+3]; help += s[i+4];
        if (help == "-----") ans.push_back(0);
        if (help == ".----") ans.push_back(1);
        if (help == "..---") ans.push_back(2);
        if (help == "...--") ans.push_back(3);
        if (help == "....-") ans.push_back(4);
        if (help == ".....") ans.push_back(5);
        if (help == "-....") ans.push_back(6);
        if (help == "--...") ans.push_back(7);
        if (help == "---..") ans.push_back(8);
        if (help == "----.") ans.push_back(9);
        //cout << help << "\n" << ans[i];
    }
    for (ll i = 0; i < ans.size(); i++){
        cout << ans[i];
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/01ms500 KiB
2Accepted0/01ms316 KiB
3Accepted3/31ms500 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms316 KiB
9Accepted4/41ms316 KiB
10Accepted4/41ms316 KiB
11Accepted4/41ms508 KiB
12Accepted7/71ms316 KiB
13Accepted7/71ms316 KiB
14Accepted8/81ms316 KiB
15Accepted8/81ms316 KiB