69582023-12-21 22:57:27999Morze (60 pont)cpp17Runtime error 30/604ms3884 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	string v;cin>>v;
	int n=v.size();
	string num;
	int i=n-1;
	while(i>=0){
		string ss=v.substr(i-4,5);
		i-=5;
		if(ss=="-----")num+='0';
		if(ss==".----")num+='1';
		if(ss=="..---")num+='2';
		if(ss=="...--")num+='3';
		if(ss=="....-")num+='4';
		if(ss==".....")num+='5';
		if(ss=="-....")num+='6';
		if(ss=="--...")num+='7';
		if(ss=="---..")num+='8';
		if(ss=="----.")num+='9';
	}
	reverse(num.begin(),num.end());
	cout<<stoi(num)<<endl;
}
SubtaskSumTestVerdictTimeMemory
base30/60
1Accepted0/03ms1816 KiB
2Runtime error0/04ms2592 KiB
3Accepted3/33ms2384 KiB
4Accepted3/33ms2428 KiB
5Accepted3/33ms2536 KiB
6Accepted3/33ms2616 KiB
7Accepted3/33ms2608 KiB
8Accepted3/33ms2756 KiB
9Accepted4/43ms2812 KiB
10Accepted4/43ms2824 KiB
11Accepted4/43ms2972 KiB
12Runtime error0/74ms3584 KiB
13Runtime error0/74ms3536 KiB
14Runtime error0/84ms3884 KiB
15Runtime error0/84ms3832 KiB