No.2864 String of yuusaan
タグ : / 解いたユーザー数 117
作問者 :
寝癖
👑 Story
Yu~san, a researcher, is explaining to you, his assistant, a string he says he found during his research.
"This string, yuusaan, looks like nothing more than my nickname at first glance, but... look, it has become yuusaanuusaayuusaan.
It seems that y and n are turning into yuusaan, and if left alone, it will probably grow longer at a terrifying rate. At this rate it will eventually grow long enough to cover the whole Earth, and we'll have no choice but to launch it into space on a rocket.
So, I'd like you to analyze it before it's too late. I'm counting on you."
Problem Statement
Let the level $1$ Yu~ string be yuusaan.
For each integer $i$ greater than or equal to $2$, the level $i$ Yu~ string is defined as follows.
- The string obtained by replacing every
yand everynin the level $(i-1)$ Yu~ string withyuusaan
Determine the $K$-th character of the level $N$ Yu~ string.
Input
$N\ K$
Constraints
- $1\leq N,K\leq 10^{15}$
- The level $N$ Yu~ string has length at least $K$
Output
Output the answer on one line, followed by a newline.
Sample
Sample 1
Input
2 8
Output
u
The level $2$ Yu~ string is yuusaanuusaayuusaan, so output its $8$-th character, u.
Sample 2
Input
1 1
Output
y
The level $1$ Yu~ string is yuusaan.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。