在ICPC竞赛中,气球分发如下:
每当一个团队解决问题时,该团队就会得到一个气球。
第一个解决问题的团队得到了一个额外的气球。
一场比赛共有26道题,分别标记为A、B、C、…、Z。你将获得比赛中已解决问题的顺序,用字符串s表示,其中第i个字符表示问题si已由某个团队解决。没有一个团队会两次解决同一问题。
确定团队收到的气球总数。请注意,有些问题可能没有一个团队能够解决。
In an ICPC contest, balloons are distributed as follows:
Determine the total number of balloons that the teams recieved. Note that some problems may be solved by none of the teams.
The first line of the input contains an integer tt (1≤t≤1001≤t≤100) — the number of testcases.
The first line of each test case contains an integer nn (1≤n≤501≤n≤50) — the length of the string.
The second line of each test case contains a string ss of length nn consisting of uppercase English letters, denoting the order of solved problems.
For each test case, output a single integer — the total number of balloons that the teams received.
6
3
ABA
1
A
3
ORZ
5
BAAAA
4
BKPT
10
CODEFORCES
5
2
6
7
8
17
In the first test case, 55 balloons are given out:
In the second test case, there is only one problem solved. The team who solved it receives 22 balloons: one because they solved the problem, an an additional one because they are the first team to solve problem AA.