103730: [Atcoder]ABC373 A - September
Description
Score : $100$ points
Problem Statement
There are $12$ strings $S_1, S_2, \ldots, S_{12}$ consisting of lowercase English letters.
Find how many integers $i$ $(1 \leq i \leq 12)$ satisfy that the length of $S_i$ is $i$.
Constraints
- Each $S_i$ is a string of length between $1$ and $100$, inclusive, consisting of lowercase English letters. $(1 \leq i \leq 12)$
Input
The input is given from Standard Input in the following format:
$S_1$ $S_2$ $\vdots$ $S_{12}$
Output
Print the number of integers $i$ $(1 \leq i \leq 12)$ such that the length of $S_i$ is $i$.
Sample Input 1
january february march april may june july august september october november december
Sample Output 1
1
There is only one integer $i$ such that the length of $S_i$ is $i$: $9$. Thus, print 1
.
Sample Input 2
ve inrtfa npccxva djiq lmbkktngaovl mlfiv fmbvcmuxuwggfq qgmtwxmb jii ts bfxrvs eqvy
Sample Output 2
2
There are two integers $i$ such that the length of $S_i$ is $i$: $4$ and $8$. Thus, print 2
.
Output
得分:$100$ 分
问题陈述
有 $12$ 个由小写英文字母组成的字符串 $S_1, S_2, \ldots, S_{12}$。
找出有多少个整数 $i$ $(1 \leq i \leq 12)$ 满足 $S_i$ 的长度为 $i$。
约束条件
- 每个 $S_i$ 是一个长度在 $1$ 到 $100$(包括)之间,由小写英文字母组成的字符串。$(1 \leq i \leq 12)$
输入
输入从标准输入以下格式给出:
$S_1$ $S_2$ $\vdots$ $S_{12}$
输出
打印满足 $S_i$ 的长度为 $i$ 的整数 $i$ 的数量 $(1 \leq i \leq 12)$。
示例输入 1
january february march april may june july august september october november december
示例输出 1
1
只有一个整数 $i$ 满足 $S_i$ 的长度为 $i$:$9$。因此,打印 1
。
示例输入 2
ve inrtfa npccxva djiq lmbkktngaovl mlfiv fmbvcmuxuwggfq qgmtwxmb jii ts bfxrvs eqvy
示例输出 2
2
有两个整数 $i$ 满足 $S_i$ 的长度为 $i$:$4$ 和 $8$。因此,打印 2
。