Deepak_and_roses

here is the link to my code


i think my code is right it is giving wrong answer because i am unable to input the blank line. Can u help me modifying my code so that it correctly inputs the blank line.

@ankitkumarmbill1 you just have to take input normally if blank line is given its no need to worry about. the error must be something else

i am passing the testcases but getting wrong answer…can u check what is the error

@ankitkumarmbill1 check your o/p for
1
3
209 72 156
281