0
点赞
收藏
分享

微信扫一扫

codeforces 837A Text Volume


​​点击打开链接​​


A. Text Volume



time limit per test



memory limit per test



input



output



You are given a text of single-space separated words, consisting of small and capital Latin letters.

Volume of the word is number of capital letters in the word. Volume of the text is maximum volume

volume



Input



n (1 ≤ n ≤ 200) — length of the text.

s1, s2, ..., si, consisting only of small and capital Latin letters.



Output



volume



Examples



input



7 NonZERO



output



5



input



24 this is zero answer text



output



0



input



24 Harbour Space University



output



1



Note



5

0





水题



#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
char s[200];
int m=0,x,n;
scanf("%d",&n);
while(~scanf("%s",s))
{
x=0;
int len=strlen(s);
for(int i=0;i<len;i++)
{
if(s[i]>='A'&&s[i]<='Z')
x++;
}
m=max(m,x);
}
printf("%d\n",m);
return 0;
}




举报

相关推荐

0 条评论