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. pygame 入门实例教程 1 - 复古方块赛车游戏

    作者自我介绍:大爽歌, b站小UP主 ,直播编程+红警三 ,python1对1辅导老师 . 本教程步骤明确,过程清晰简明,最终代码量250行上下,适合学习pygame的新手. 项目代码已上传到我的gi ...

  2. rnacos实现raft和类distro协议,支持集群部署

    1. rnacos 简介 rnacos是一个用rust实现的nacos服务. rnacos是一个轻量. 快速.稳定.高性能的服务:包含注册中心.配置中心.web管理控制台功能,支持单机.集群部署. r ...

  3. EtherCAT转Modbus网关做为 MODBUS 从站配置

    EtherCAT转Modbus网关做为 MODBUS 从站配置案例 兴达易控EtherCAT转Modbus网关可以用作MODBUS从站的配置.这种网关允许将Modbus协议与EtherCAT协议进行转 ...

  4. Machine Learning for NetFlow Anomaly Detection With Human-Readable Annotations 笔记

    Machine Learning for NetFlow Anomaly Detection With Human-Readable Annotations 关键摘要 我们开发了一个复杂企业网络中的异 ...

  5. ES6 Module模块,在vsCode中已服务器模式运行HTML文件

    操作步骤如下: 一.安装Live Server 插件 二.点击扩展设置 三.设置live server默认打开浏览器为"chrome" 四.配置-工作区 五.在HTML文件中,右键 ...

  6. ⭐volatile⭐ 用volatile关键字则会从内存中直接读取变量的值

  7. Markdown · Typora | 基本画图技巧

    如果想画一些简单的状态图,可以使用 typora 自带的 mermaid 工具. (mermaid 不止能画简单的状态图,还能画流程图等,详见参考资料) 定义节点 可以定义不同形状的节点,并为节点添加 ...

  8. 使用Eclipse生成CHM帮助文档(图解)

    使用Eclipse生成CHM帮助文档(图解) 博客分类: System Operate javadoc生成chm文档java生成api帮助文档api帮助文档生成工具 Eclipse JavaDoc和j ...

  9. 关于CAS等原子操作,说点别人没说的

    Java中提供了原子操作,可以简单看一下AtomicInteger类中的一个典型的原子操作incrementAndGet(),表示对原子整数变量进行加操作,并返回新的值.实现如下: public cl ...

  10. 解密长短时记忆网络(LSTM):从理论到PyTorch实战演示

    本文深入探讨了长短时记忆网络(LSTM)的核心概念.结构与数学原理,对LSTM与GRU的差异进行了对比,并通过逻辑分析阐述了LSTM的工作原理.文章还详细演示了如何使用PyTorch构建和训练LSTM ...