145432025-01-14 13:26:35TortelliniJrMorze (60 pont)cpp17Accepted 60/601ms508 KiB
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s, r;
	int count = 0;
	cin >> s;
	for (int i = 0; i < s.length() - 1; i += 5)
	{
		for (int u = 0; u < 5; u++)
		{
			if (s[i + u] == '.')
			{
				count++;
			}
		}
		if (s[i] == '-' && count != 0)
		{
			r.append(to_string(10 - count));
		}
		else if (s[i] == '.' && count != 0)
		{
			r.append(to_string(count));
		}
		else
		{
			r.append("0");
		}
		count = 0;
	}
	cout << r;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/01ms316 KiB
2Accepted0/01ms500 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms508 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms500 KiB
8Accepted3/31ms508 KiB
9Accepted4/41ms316 KiB
10Accepted4/41ms368 KiB
11Accepted4/41ms316 KiB
12Accepted7/71ms316 KiB
13Accepted7/71ms316 KiB
14Accepted8/81ms316 KiB
15Accepted8/81ms316 KiB