76122024-01-10 09:06:41DhaneHaneMorze (60 pont)cpp17Wrong answer 3/603ms3708 KiB
#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s,val="",al=""; cin>>s;
    for (int i=0;i<s.size();i+=5)
    {
        for (int j=i;j<i+5;++j)
        {
            al.push_back(s[j]);
        }
        if (al=="-----") val.push_back('0');
        if (al==".----") val.push_back('1');
        if (al=="..---") val.push_back('2');
        if (al=="...--") val.push_back('3');
        if (al=="....-") val.push_back('4');
        if (al==".....") val.push_back('5');
        if (al=="----.") val.push_back('6');
        if (al=="---..") val.push_back('7');
        if (al=="--...") val.push_back('8');
        if (al=="-....") val.push_back('9');
    }
    cout << val;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/60
1Wrong answer0/03ms1808 KiB
2Wrong answer0/03ms1908 KiB
3Accepted3/32ms1976 KiB
4Wrong answer0/33ms2216 KiB
5Wrong answer0/33ms2432 KiB
6Wrong answer0/33ms2556 KiB
7Wrong answer0/33ms2784 KiB
8Wrong answer0/33ms2988 KiB
9Wrong answer0/43ms3228 KiB
10Wrong answer0/43ms3440 KiB
11Wrong answer0/43ms3528 KiB
12Wrong answer0/73ms3532 KiB
13Wrong answer0/73ms3496 KiB
14Wrong answer0/83ms3624 KiB
15Wrong answer0/83ms3708 KiB