30312023-02-08 18:29:25xxxMorze (60 pont)cpp11Accepted 60/603ms4104 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    string mordze;
    getline(cin, mordze);


    char kezd, veg;
    int szam = 0;

    for (int i = 0; i < mordze.length() / 5; i++){
        kezd = mordze[i * 5];
        szam = 0;
        if (kezd == '-')
            szam = 5;
        for (int j = 0; j < 5; j++) {
            if (kezd == '.' && mordze[(i * 5) + j] == '.') {
                szam++;
            } else if (kezd == '-' && mordze[(i * 5) + j] == '-') {
                szam++;
            }
        }
        if (kezd == '-' && mordze[(i * 5) + 4] == '-')
            cout << 0; else cout << szam;
    }
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1816 KiB
2Accepted0/03ms2052 KiB
3Accepted3/33ms2252 KiB
4Accepted3/33ms2460 KiB
5Accepted3/32ms2512 KiB
6Accepted3/33ms2512 KiB
7Accepted3/33ms2640 KiB
8Accepted3/33ms2848 KiB
9Accepted4/43ms2968 KiB
10Accepted4/43ms3164 KiB
11Accepted4/43ms3380 KiB
12Accepted7/73ms3584 KiB
13Accepted7/73ms3800 KiB
14Accepted8/83ms4012 KiB
15Accepted8/83ms4104 KiB