#abc218a. A - Weather Forecast

A - Weather Forecast

Score : 100100 points

问题描述

你将获得一个字符串 SS,它表示从明天开始连续七天的天气预报。
如果 SS 的第 ii 个字符为 o,则表示这七天中的第 ii 天预报为晴天;若该字符为 x,则表示预报为雨天。

请告诉我们第 NN 天是否预报为晴天。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

You are given a string SS, which represents a weather forecast for the seven days starting tomorrow.
The ii-th of those seven days is forecast to be sunny if the ii-th character of SS is o, and rainy if that character is x.

Tell us whether the NN-th day is forecast to be sunny.

Constraints

  • NN is an integer between 11 and 77 (inclusive).
  • SS is a string of length 77 consisting of o and x.

Input

Input is given from Standard Input in the following format:

NN

SS

Output

Print Yes if the NN-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

update @ 2024/3/10 09:38:20