#P1885. Moo
Moo
Description
Cow Bessie has recently been studying string operations. She constructs new strings one by one using the following rules:
moo.
m ooo moo m ooo moo moomooomoo.
m oooo moomooomoo m oooo moomooomoo moomooomoomoooomoomooomoo.
Bessie keeps generating strings until the length of the last generated string is at least the input integer .
From the above, we can see that the -th string is formed by concatenating: the -th string m 个 the -th string.
Now the problem is: given an integer (), determine whether the -th character is the letter m or o.
Input Format
A single positive integer .
Output Format
A single character, m or o.
11
m
Hint
Sample explanation:
As stated, string is moo. We need the -th character, and clearly is not long enough. Likewise, the length of is , still not enough. The length of is , which is enough. The -th character of is m, so the answer is m.
Constraints:
.
Translated by ChatGPT 5
京公网安备 11011102002149号