Hello Everyone!↵
↵
I was trying to write a solution in JavaScript V8 and test it in the Custom Invocation section before submitting. Unfortunately I was getting "TypeError" on invocation of string methods for the string returned by `readline()`.↵
![ ](/predownloaded/39/83/3983145891d77b934df3ddbacca025c96b447233.png)↵
↵
I submitted the same code later and got "Accepted"!↵
![ ](/predownloaded/7f/fd/7ffda851ef866a031ff82a08d922dfd3694a085d.png)↵
↵
If I have understood anything wrong please correct me, else I am expecting this to be figured out soon### Reason↵
For `readline()` to work successfully the input line must end with a new line(`'n'`). When I was manually selecting and copying example input text from the problem statement page, it was not being copied with the ending new line. But, when I copied the same input by clicking the "Copy" button at the right side of the example input box, it was copied with the ending new line character.↵
↵
#### Good Practice↵
If input is manually selected and copied, or typed in the Custom Invocation input box by using keyboard, a new line at the end of the input line can make `readline()` work perfectly.↵
↵
Thank you very much for reading.
↵
I was trying to write a solution in JavaScript V8 and test it in the Custom Invocation section before submitting. Unfortunately I was getting "TypeError" on invocation of string methods for the string returned by `readline()`.↵
![ ](/predownloaded/39/83/3983145891d77b934df3ddbacca025c96b447233.png)↵
↵
I submitted the same code later and got "Accepted"!↵
![ ](/predownloaded/7f/fd/7ffda851ef866a031ff82a08d922dfd3694a085d.png)↵
↵
For `readline()` to work successfully the input line must end with a new line(`'n'`). When I was manually selecting and copying example input text from the problem statement page, it was not being copied with the ending new line. But, when I copied the same input by clicking the "Copy" button at the right side of the example input box, it was copied with the ending new line character.↵
↵
#### Good Practice↵
If input is manually selected and copied, or typed in the Custom Invocation input box by using keyboard, a new line at the end of the input line can make `readline()` work perfectly.↵
↵
Thank you very much for reading.