119442024-11-21 18:36:36tomi7Morze (60 pont)cpp17Accepted 60/601ms572 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	string s;cin>>s;
	vector<int> a;
	for(int i=0;i<s.size();i++){
		if((i+1)%5==0){
			if(s[i]=='-' && s[i-4]=='-'){
				a.push_back(0);
			}else if(s[i]=='-' && s[i-3]=='-'){
				a.push_back(1);
			}else if(s[i]=='-' && s[i-2]=='-'){
				a.push_back(2);
			}else if(s[i]=='-' && s[i-1]=='-'){
				a.push_back(3);
			}else if(s[i]=='-' && s[i]=='-'){
				a.push_back(4);
			}else if(s[i-4]=='.'){
				a.push_back(5);
			}else if(s[i-3]=='.'){
				a.push_back(6);
			}else if(s[i-2]=='.'){
				a.push_back(7);
			}else if(s[i-1]=='.'){
				a.push_back(8);
			}else{
				a.push_back(9);
			}
		}
	}
	for(int x: a){
		cout<<x;
	}
	cout<<'\n';
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/01ms500 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms320 KiB
5Accepted3/31ms320 KiB
6Accepted3/31ms320 KiB
7Accepted3/31ms320 KiB
8Accepted3/31ms512 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms324 KiB
11Accepted4/41ms320 KiB
12Accepted7/71ms572 KiB
13Accepted7/71ms320 KiB
14Accepted8/81ms360 KiB
15Accepted8/81ms332 KiB