mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
c9791a72c9
4500-4599
29 lines
574 B
C++
29 lines
574 B
C++
#include<stdio.h>
|
|
#include<string.h>
|
|
int main()
|
|
{
|
|
int a, i, c, n, cnt[105];
|
|
scanf("%d",&c);
|
|
while(c--)
|
|
{
|
|
scanf("%d",&n);
|
|
memset(cnt, 0, sizeof(cnt));
|
|
int Max = 0;
|
|
for(i = 0; i < n; i++)
|
|
{
|
|
scanf("%d",&a);
|
|
cnt[a]++;
|
|
if(a > Max)
|
|
Max = a;
|
|
}
|
|
int ans = Max * 10;
|
|
for(i = 1; i <= Max; i++)
|
|
{
|
|
if(cnt[i])
|
|
ans += 5 + cnt[i];
|
|
}
|
|
printf("%d\n",ans);
|
|
}
|
|
return 0;
|
|
}
|