113812024-08-29 13:51:14MCDaveSzózatcpp17Accepted 100/1003ms680 KiB
#include <iostream>

using namespace std;

int main()
{
	int n, x = 0, abc = 26, i, out = 1;
	char temp;
	cin >> n;
	abc -= n;

	for (i = 0; i < n; i++)
	{
		cin >> temp;
		if (temp == '_')
		{
			x++, abc++;
		}
	}

	for (i = 0; i < x; i++)
	{
		out *= abc;
		abc--;
	}

	cout << out;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted2ms504 KiB
2Accepted2ms360 KiB
subtask210/10
3Accepted3ms528 KiB
4Accepted3ms400 KiB
5Accepted3ms428 KiB
subtask320/20
6Accepted2ms400 KiB
7Accepted3ms360 KiB
8Accepted3ms384 KiB
9Accepted3ms396 KiB
10Accepted2ms376 KiB
11Accepted2ms400 KiB
subtask430/30
12Accepted3ms420 KiB
13Accepted3ms380 KiB
14Accepted3ms680 KiB
15Accepted3ms524 KiB
16Accepted3ms376 KiB
17Accepted3ms384 KiB
subtask540/40
18Accepted2ms360 KiB
19Accepted3ms636 KiB
20Accepted3ms504 KiB
21Accepted3ms412 KiB
22Accepted3ms488 KiB
23Accepted3ms360 KiB
24Accepted3ms360 KiB