102180: [AtCoder]ABC218 A - Weather Forecast
Description
Score : $100$ points
Problem Statement
You are given a string $S$, which represents a weather forecast for the seven days starting tomorrow.
The $i$-th of those seven days is forecast to be sunny if the $i$-th character of $S$ is o
, and rainy if that character is x
.
Tell us whether the $N$-th day is forecast to be sunny.
Constraints
- $N$ is an integer between $1$ and $7$ (inclusive).
- $S$ is a string of length $7$ consisting of
o
andx
.
Input
Input is given from Standard Input in the following format:
$N$ $S$
Output
Print Yes
if the $N$-th of the seven days starting tomorrow is forecast to be sunny, and No
if that day is forecast to be rainy.
Sample Input 1
4 oooxoox
Sample Output 1
No
The forecast for each of the seven days starting tomorrow is as follows: sunny, sunny, sunny, rainy, sunny, sunny, rainy.
In particular, the fourth day is forecast to be rainy.
Sample Input 2
7 ooooooo
Sample Output 2
Yes
Input
题意翻译
有一个长为 $7$ 的字符串 $s$ ,由‘o’和‘x’组成。如果字符串的第 $n$ 个字符是‘o’输出Yes,否则输出No。(字符串下标从 $1$ 开始)Output
分数:100分
问题描述
给你一个字符串$S$,它表示从明天开始的七天天气预报。
如果$S$的第$i$个字符是o
,那么那七天中的第$i$天预报为晴天;如果那个字符是x
,那么那天预报为雨天。
告诉我们第$N$天预报是否为晴天。
限制条件
- $N$是一个介于1和7(包括)之间的整数。
- $S$是一个长度为7的字符串,由
o
和x
组成。
输入
输入通过标准输入给出如下格式:
$N$ $S$
输出
如果从明天开始的七天中的第$N$天预报为晴天,打印Yes
;如果那天预报为雨天,打印No
。
样例输入1
4 oooxoox
样例输出1
No
从明天开始的七天预报如下:晴天,晴天,晴天,雨天,晴天,晴天,雨天。
特别是第四天预报为雨天。
样例输入2
7 ooooooo
样例输出2
Yes