A11396 | Nephren gives a riddle
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
What are you doing at the end of the world? Are you busy? Will you save us?

Nephren is playing a game with little leprechauns.
She gives them an infinite array of strings, $f_{0...\ ∞}$ .
$f_{0}$ is "What are you doing at the end of the world? Are you busy? Will you save us?".
She wants to let more people know about it, so she defines $f_{i}=$ "What are you doing while sending " $f_{i-1}$ "? Are you busy? Will you send " $f_{i-1}$ "?" for all $i>=1$ .
For example, $f_{1}$ is
"What are you doing while sending "What are you doing at the end of the world? Are you busy? Will you save us?"? Are you busy? Will you send "What are you doing at the end of the world? Are you busy? Will you save us?"?". Note that the quotes in the very beginning and in the very end are for clarity and are not a part of $f_{1}$ .
It can be seen that the characters in $f_{i}$ are letters, question marks, (possibly) quotation marks and spaces.
Nephren will ask the little leprechauns $q$ times. Each time she will let them find the $k$ -th character of $f_{n}$ . The characters are indexed starting from $1$ . If $f_{n}$ consists of less than $k$ characters, output '.' (without quotes).
Can you answer her queries?

Nephren is playing a game with little leprechauns.
She gives them an infinite array of strings, $f_{0...\ ∞}$ .
$f_{0}$ is "What are you doing at the end of the world? Are you busy? Will you save us?".
She wants to let more people know about it, so she defines $f_{i}=$ "What are you doing while sending " $f_{i-1}$ "? Are you busy? Will you send " $f_{i-1}$ "?" for all $i>=1$ .
For example, $f_{1}$ is
"What are you doing while sending "What are you doing at the end of the world? Are you busy? Will you save us?"? Are you busy? Will you send "What are you doing at the end of the world? Are you busy? Will you save us?"?". Note that the quotes in the very beginning and in the very end are for clarity and are not a part of $f_{1}$ .
It can be seen that the characters in $f_{i}$ are letters, question marks, (possibly) quotation marks and spaces.
Nephren will ask the little leprechauns $q$ times. Each time she will let them find the $k$ -th character of $f_{n}$ . The characters are indexed starting from $1$ . If $f_{n}$ consists of less than $k$ characters, output '.' (without quotes).
Can you answer her queries?
输入格式
The first line contains one integer $q$ ( $1<=q<=10$ ) — the number of Nephren's questions.
Each of the next $q$ lines describes Nephren's question and contains two integers $n$ and $k$ ( $0<=n<=10^{5},1<=k<=10^{18}$ ).
Each of the next $q$ lines describes Nephren's question and contains two integers $n$ and $k$ ( $0<=n<=10^{5},1<=k<=10^{18}$ ).
输出格式
One line containing $q$ characters. The $i$ -th character in it should be the answer for the $i$ -th query.
输入输出样例
输入 #1
3 1 1 1 2 1 111111111111
输出 #1
Wh.
输入 #2
5 0 69 1 194 1 139 0 47 1 66
输出 #2
abdef
输入 #3
10 4 1825 3 75 3 530 4 1829 4 1651 3 187 4 584 4 255 4 774 2 474
输出 #3
Areyoubusy
For the first two examples, refer to $f_{0}$ and $f_{1}$ given in the legend.
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted