28902023-02-02 09:06:39CzDaniMorze (60 pont)cpp14Accepted 60/603ms3680 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    string s, ans="";
    cin>>s;
    for (int i = 0; i < s.size()/5; i++) {
        string ss = s.substr(i*5, 5);
        char c = (ss=="-----"?'0':(ss==".----"?'1':(ss=="..---"?'2':(ss=="...--"?'3':(ss=="....-"?'4':(ss=="....."?'5':(ss=="-...."?'6':(ss=="--..."?'7':ss=="---.."?'8':'9'))))))));
        ans+=c;
    }
    cout<<ans;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1812 KiB
2Accepted0/03ms2016 KiB
3Accepted3/32ms2120 KiB
4Accepted3/32ms2192 KiB
5Accepted3/32ms2320 KiB
6Accepted3/33ms2560 KiB
7Accepted3/33ms2692 KiB
8Accepted3/33ms2900 KiB
9Accepted4/43ms3144 KiB
10Accepted4/42ms3220 KiB
11Accepted4/42ms3348 KiB
12Accepted7/73ms3560 KiB
13Accepted7/72ms3680 KiB
14Accepted8/83ms3640 KiB
15Accepted8/83ms3648 KiB