15062022-11-21 14:50:43teodorbatkaiMorze (60 pont)cpp11Accepted 60/603ms3724 KiB
#include <bits/stdc++.h>

using namespace std;

int main(){
    string be;
    cin >> be;
    int l = be.length() / 5;
    for(int i = 0; i < l; i++){
        
        if(be[i*5] == '-' && be[i*5+4] == '-'){
            cout << "0";
        }else if(be[i*5] == '.' && be[i*5+1] == '-'){
            cout << "1";
        }else if(be[i*5] == '.' && be[i*5+2] == '-'){
            cout << "2";
        }else if(be[i*5] == '.' && be[i*5+3] == '-'){
            cout << "3";
        }else if(be[i*5] == '.' && be[i*5+4] == '-'){
            cout << "4";
        }else if(be[i*5] == '.' && be[i*5+4] == '.'){
            cout << "5";
        }else if(be[i*5] == '-' && be[i*5+1] == '.'){
            cout << "6";
        }else if(be[i*5] == '-' && be[i*5+2] == '.'){
            cout << "7";
        }else if(be[i*5] == '-' && be[i*5+3] == '.'){
            cout << "8";
        }else if(be[i*5] == '-' && be[i*5+4] == '.'){
            cout << "9";
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1812 KiB
2Accepted0/02ms2064 KiB
3Accepted3/32ms2260 KiB
4Accepted3/32ms2408 KiB
5Accepted3/32ms2616 KiB
6Accepted3/32ms2824 KiB
7Accepted3/32ms2896 KiB
8Accepted3/32ms3020 KiB
9Accepted4/42ms3228 KiB
10Accepted4/42ms3304 KiB
11Accepted4/42ms3312 KiB
12Accepted7/72ms3436 KiB
13Accepted7/72ms3568 KiB
14Accepted8/82ms3648 KiB
15Accepted8/82ms3724 KiB