i am getting wrong answer although all test cases which i entered on my kmowledge are passing correctly but not getting AC, anyone plzz help
If all test cases are passing correctly then you can’t get WA. So they aren’t all passing correctly. Also, whatcha want us to do? Code a whole new piece of code and submit through that link you give?
Please provide a link to your commented code so that others can help.
here is my solution , i tried my best to find error but i am unable to get AC, plzz help
i mean that i have tried all test cases as possible, but i can’t find any error and i want help regarding my code
I feel you got the question wrong. It says that if the integers are contiguous, eg
5,6,7,8,9, then compress them, eg -
5...9 . But I see you using some arithmatic progression stuff there. Things like
6,8,10 are not to be compressed as 6 and 8 are not consecutive.
i got the question correctly , you should take a look on my solution plzz then you will come to know why i used A.P.
oh, i got it thank you so much , it just needed a small correction