76182024-01-10 09:11:10DhaneHaneMorze (60 pont)cpp17Wrong answer 9/603ms3080 KiB
#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s, val = ""; 
    cin>>s;
    for (int i=0;i<s.size();i+=5)
    {
        string al = "";
        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
base9/60
1Wrong answer0/03ms1688 KiB
2Wrong answer0/03ms1924 KiB
3Accepted3/33ms2168 KiB
4Wrong answer0/32ms2252 KiB
5Accepted3/33ms2304 KiB
6Accepted3/33ms2500 KiB
7Wrong answer0/33ms2548 KiB
8Wrong answer0/33ms2672 KiB
9Wrong answer0/43ms2888 KiB
10Wrong answer0/43ms2964 KiB
11Wrong answer0/43ms2960 KiB
12Wrong answer0/73ms2964 KiB
13Wrong answer0/73ms3080 KiB
14Wrong answer0/83ms2972 KiB
15Wrong answer0/83ms2972 KiB