mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
37c7dfef72
4100-4199
34 lines
605 B
C++
34 lines
605 B
C++
#include <stdio.h>
|
|
#include <string.h>
|
|
int num(char c)
|
|
{
|
|
if(c>='A' && c<='Z')
|
|
return 0;
|
|
else return 1;
|
|
}
|
|
int main()
|
|
{
|
|
int n,i,k;
|
|
char a[10005];
|
|
while(~scanf("%d%s",&n,a))
|
|
{
|
|
for(i = 0;i<n;i+=5)
|
|
{
|
|
k = 0;
|
|
if(num(a[i]))
|
|
k+=16;
|
|
if(num(a[i+1]))
|
|
k+=8;
|
|
if(num(a[i+2]))
|
|
k+=4;
|
|
if(num(a[i+3]))
|
|
k+=2;
|
|
if(num(a[i+4]))
|
|
k++;
|
|
printf("%c",k+'A');
|
|
}
|
|
printf("\n");
|
|
}
|
|
return 0;
|
|
}
|