CF837A.Text Volume

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

给你一段由单个空格分隔的单词组成的文本,单词仅由小写和大写的拉丁字母组成。

一个单词的体积定义为该单词中大写字母的个数。一段文本的体积定义为该文本中所有单词体积的最大值。

请计算给定文本的体积。

输入格式

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 _s_1, _s_2, ..., s__i, consisting only of small and capital Latin letters.

第一行包含一个整数 $ n (( 1 \leq n \leq 200 $)—— 文本的长度。

第二行包含由单个空格分隔的单词 $ s_1,\ s_2,\ \dots,\ s_i $ 组成的文本,这些单词仅由小写和大写拉丁字母组成。

输出格式

Print one integer number — volume of text.

输出一个整数——文本的体积。

输入输出样例

  • 输入#1

    7
    NonZERO

    输出#1

    5
  • 输入#2

    24
    this is zero answer text

    输出#2

    0
  • 输入#3

    24
    Harbour Space University

    输出#3

    1

说明/提示

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.

在第一个例子中,只有一个单词,其中包含 5 个大写字母。

在第二个例子中,所有单词均包含 0 个大写字母。

输入解题思路,AI测评打分。不知道怎么写?

首页