No.2868 Another String of yuusaan
タグ : / 解いたユーザー数 43
作問者 :
寝癖
👑 Story
Yuusaan, a researcher from a parallel world, seems to have found another strange string during research.
"Take a look. This one also starts as yuusaan, but this time u and a apparently split. Its length grows faster than the one I found before. Well then, please analyze it again~"
If this string were sent into space, it would soon fill the entire universe. Let us hurry with the analysis.
Problem Statement
Let the level $1$ Yuu-string be yuusaan.
For each integer $i$ greater than or equal to $2$, the level $i$ Yuu-string is defined as follows.
- The string obtained by replacing every
uand everyain the level $(i-1)$ Yuu-string withyuusaan
Determine the $K$-th character of the level $N$ Yuu-string.
Input
$N\ K$
Constraints
- $1\leq N,K\leq 10^{15}$
- The level $N$ Yuu-string has length at least $K$
Output
Output the answer on one line, followed by a newline.
Sample
Sample 1
Input
2 8
Output
n
The level $2$ Yuu-string is yyuusaanyuusaansyuusaanyuusaann, so output its $8$-th character, n.
Sample 2
Input
1 1
Output
y
The level $1$ Yuu-string is yuusaan.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。