A. Text Volume
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard 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 of all words in the text.

Calculate the volume of the given text.

Input

The first line contains one integer number n (1 ≤ n ≤ 200) — length of the text.

The second line contains text of single-space separated words s1, s2, ..., si, consisting only of small and capital Latin letters.

Output

Print one integer number — volume of text.

Examples
input
7
NonZERO
output
5
input
24
this is zero answer text
output
0
input
24
Harbour Space University
output
1
Note

In the first example there is only one word, there are 5 capital letters in it.

In the second example all of the words contain 0 capital letters.

题目大意:输出所给字符串中大写字符最多的数量

输入输出的入门题。

 1 #include<iostream>
2 #include<stdio.h>
3 using namespace std;
4 int main(){
5 int n;
6 char a[300];
7 cin>>n;
8 char c;
9 c=getchar();
10 gets(a);
11 int mx=0;
12 for(int i=0;i<n;i++){
13 int tmp=0;
14 while(a[i]!=' '&&i<n){
15 if(a[i]>='A'&&a[i]<='Z'){
16 tmp++;
17 }
18 i++;
19 }
20 mx=max(mx,tmp);
21 }
22 cout<<mx<<endl;
23 return 0;
24 }

Educational Codeforces Round 26 Problem A的更多相关文章

  1. Educational Codeforces Round 26

    Educational Codeforces Round 26 困到不行的场,等着中午显示器到了就可以美滋滋了 A. Text Volume time limit per test 1 second ...

  2. CodeForces 837F - Prefix Sums | Educational Codeforces Round 26

    按tutorial打的我血崩,死活挂第四组- - 思路来自FXXL /* CodeForces 837F - Prefix Sums [ 二分,组合数 ] | Educational Codeforc ...

  3. CodeForces - 837E - Vasya's Function | Educational Codeforces Round 26

    /* CodeForces - 837E - Vasya's Function [ 数论 ] | Educational Codeforces Round 26 题意: f(a, 0) = 0; f( ...

  4. CodeForces 837D - Round Subset | Educational Codeforces Round 26

    /* CodeForces 837D - Round Subset [ DP ] | Educational Codeforces Round 26 题意: 选k个数相乘让末尾0最多 分析: 第i个数 ...

  5. Educational Codeforces Round 32 Problem 888C - K-Dominant Character

    1) Link to the problem: http://codeforces.com/contest/888/problem/C 2) Description: You are given a ...

  6. Educational Codeforces Round 26 [ D. Round Subset ] [ E. Vasya's Function ] [ F. Prefix Sums ]

    PROBLEM D - Round Subset 题 OvO http://codeforces.com/contest/837/problem/D 837D 解 DP, dp[i][j]代表已经选择 ...

  7. Educational Codeforces Round 26 B,C

    B. Flag of Berland 链接:http://codeforces.com/contest/837/problem/B 思路:题目要求判断三个字母是否是条纹型的,而且宽和高相同,那么先求出 ...

  8. Educational Codeforces Round 21 Problem E(Codeforces 808E) - 动态规划 - 贪心

    After several latest reforms many tourists are planning to visit Berland, and Berland people underst ...

  9. Educational Codeforces Round 21 Problem D(Codeforces 808D)

    Vasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into t ...

  10. Educational Codeforces Round 21 Problem A - C

    Problem A Lucky Year 题目传送门[here] 题目大意是说,只有一个数字非零的数是幸运的,给出一个数,求下一个幸运的数是多少. 这个幸运的数不是最高位的数字都是零,于是只跟最高位有 ...

随机推荐

  1. DB2---创建返回结果集的函数

    在数据验证中,经常遇到需返回结果集的操作,故整理一个返回结果集的DB2函数,便于后期查阅 1.准备测试表 /*创建测试表:设置结果集的属性为表字段*/ CREATE TABLE Test_EXWAST ...

  2. Linux系列教程——Linux文件编辑、Linux用户管理

    @ 目录 1 Linux基本权限 1.权限基本概述 1.什么是权限? 2.为什么要有权限? 3.权限与用户之间的关系? 4.权限中的rwx分别代表什么含义? 2.权限设置示例 1.为什么要设定权限,我 ...

  3. LibOciLib使用说明(2017-1-26更新)

    LibOciLib使用说明 整理者:赤勇玄心行天道 QQ:280604597 Email:280604597@qq.com 大家有什么不明白的地方,或者想要详细了解的地方可以联系我,我会认真回复的! ...

  4. Django+celery+eventlet+flower+redis异步任务创建及查询实现

    1.环境版本:Django 3.2.12celery 5.3.4eventlet 0.33.3flower 2.0.1redis 3.5.3项目名称:new_project 2.celery配置(se ...

  5. 虹科分享 | 一起聊聊Redis企业版数据库与【微服务误解】那些事儿!

    如今,关于微服务依然存在许多误解,企业盲目追求这种炫酷技术并不可取.同时,这种盲目行为对于希望用微服务来有效解决问题的公司很不利.不是说任何特定的技术都是缺乏实际价值的,如微服务.Kubernetes ...

  6. docker 仓库-Harbor

    docker 仓库之分布式 Harbor: Harbor 是一个用于存储和分发docker镜像的企业级Registry服务器,由于Vmware 开源,其通过添加一些企业必须的功能特性,例如安全.标识和 ...

  7. DNS 服务 docker-bind 的部署使用

    前言 前面使用 nginx 代理转发了几个域名到服务器,但是每次添加一个域名都需要在客户端添加一行 hosts 文件,无疑是繁琐的,其中也提到可以使用 DNS 来实现自动解析域名 到指定服务器的功能, ...

  8. kali Linux安装pyenv

    前言 pyenvpyenv 可让你轻松地在多个 Python 版本之间切换,是一个非常不错的python版本管理工具 安装步骤 安装依赖 apt-get install -y make build-e ...

  9. 在keil MDK中定义非初始化(noini)变量

    具体 可以参考ARM官方资料:ARM: Uninialized Variables Get Initialized 这里是对上述资料的总结, 该方法已在项目中得到验证. 方法: 分散加载文件如下: 定 ...

  10. 浅析KV存储之长尾时延解决办法

    本文分享自华为云社区<浅析KV存储之长尾时延问题,华为云 GeminiDB Redis 探寻行业更优解决方案!>,作者:华为云数据库GaussDB NoSQL团队. 目前,KV存储的广泛使 ...