25042023-01-14 19:35:23JMMirkoMorze (60 pont)cpp17Accepted 60/603ms3816 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	string s;
	cin >> s;
	bool b;
	for(int i=0;i<s.size();i+=5){
		b=false;
		if(s[i]=='.'){
			for(int j=1;j<5;j++){
				
				if(s[i+j]=='-' && !b){
					cout << j;
					b=true;
				}
			}
			if(!b){
					cout << 5;
				}
		}else{
			int ki;
			for(int j=4;j>=1;j--){
				if(s[i+j]=='-' && !b){
					ki=j+6;
					b=true;
					cout << ki%10;
				}
			}
			if(!b)cout << 6;
		}
	}
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1812 KiB
2Accepted0/02ms2056 KiB
3Accepted3/32ms2300 KiB
4Accepted3/32ms2508 KiB
5Accepted3/32ms2664 KiB
6Accepted3/32ms2900 KiB
7Accepted3/32ms3012 KiB
8Accepted3/32ms3212 KiB
9Accepted4/42ms3292 KiB
10Accepted4/42ms3412 KiB
11Accepted4/42ms3620 KiB
12Accepted7/72ms3700 KiB
13Accepted7/72ms3696 KiB
14Accepted8/82ms3812 KiB
15Accepted8/82ms3816 KiB