I am confused why input 1; output shoud be 1 instead of 11;
Also, input 2, what is the output ?
More examples would be really helpful for me to understand this question.
I guess you're not understand the question. The original string is 1. If input is 1, it means you should return the first level of countAndSay which is the original string 1. Input is the number of level. We count previous level's number and say at current level. Hope my explanation could help you to understand the question.
1, 1st level
11, 2nd level
21, 3rd level
1211, 4th level
111221, 5th level