38262023-03-03 10:25:25KevinMorze (60 pont)cpp17Accepted 60/603ms4140 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    string n;
    cin >> n;
    for (int i=0; i<n.size()/5; i++){
        if (n[i*5]=='-'){
            if (n[i*5+1]=='-'){
                if (n[i*5+2]=='-'){
                    if (n[i*5+3]=='-'){
                        if (n[i*5+4]=='-'){
                            cout << 0;
                        }
                        else{
                            cout << 9;
                        }
                    }
                    else{
                        cout << 8;
                    }
                }
                else{
                    cout << 7;
                }
            }
            else{
                cout << 6;
            }
        }
        else{
            if (n[i*5+1]=='.'){
                if (n[i*5+2]=='.'){
                    if (n[i*5+3]=='.'){
                        if (n[i*5+4]=='.'){
                            cout << 5;
                        }
                        else{
                            cout << 4;
                        }
                    }
                    else{
                        cout << 3;
                    }
                }
                else{
                    cout << 2;
                }
            }
            else{
                cout << 1;
            }
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1812 KiB
2Accepted0/03ms2024 KiB
3Accepted3/33ms2264 KiB
4Accepted3/33ms2472 KiB
5Accepted3/33ms2816 KiB
6Accepted3/32ms3096 KiB
7Accepted3/33ms3108 KiB
8Accepted3/32ms3200 KiB
9Accepted4/42ms3312 KiB
10Accepted4/43ms3556 KiB
11Accepted4/42ms3768 KiB
12Accepted7/72ms3940 KiB
13Accepted7/72ms4020 KiB
14Accepted8/82ms4020 KiB
15Accepted8/82ms4140 KiB