87982024-01-31 08:56:28CWMSzózatcpp17Accepted 100/1003ms3452 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <queue>
#include <set>
#include <map>

using namespace std;
using ll = long long;

signed main()
{
	{
		ios_base::sync_with_stdio(0);
		cin.tie(0);
		cout.tie(0);
	}

	int n = 26;
	ll ans = 1;
	int m = 0;
	int s;
	cin >> s;
	for (int i = 0; i < s; i++)
	{
		char next;
		cin >> next;
		if (next == '_')
		{
			m++;
		}
		else
		{
			n--;
		}
	}
	for (int i = 0; i < m; i++)
	{
		ans *= n;
		n--;
	}
	cout << ans << "\n";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1896 KiB
2Accepted3ms2112 KiB
subtask210/10
3Accepted3ms2328 KiB
4Accepted3ms2408 KiB
5Accepted3ms2812 KiB
subtask320/20
6Accepted3ms2924 KiB
7Accepted2ms2900 KiB
8Accepted3ms2912 KiB
9Accepted2ms3004 KiB
10Accepted2ms3016 KiB
11Accepted2ms3124 KiB
subtask430/30
12Accepted3ms3252 KiB
13Accepted2ms3192 KiB
14Accepted2ms3192 KiB
15Accepted3ms3204 KiB
16Accepted3ms3216 KiB
17Accepted2ms3212 KiB
subtask540/40
18Accepted2ms3224 KiB
19Accepted3ms3352 KiB
20Accepted2ms3440 KiB
21Accepted3ms3440 KiB
22Accepted3ms3448 KiB
23Accepted3ms3452 KiB
24Accepted2ms3452 KiB