Can Somebody explain why my code is giving WA on 2nd TC on testCase 38 which is s = "10111" in this problem 1879C - Make it Alternating, even tho i am getting the same output as author's Code. My Submission :- 270768936 Authors code :- 270768479
Output according to author's code is : 2 6 (for 10111) My code also gives the same answer :(
Auto comment: topic has been updated by Don_quixxote (previous revision, new revision, compare).
Auto comment: topic has been updated by Don_quixxote (previous revision, new revision, compare).
You are misinterpreting the WA statement. It is saying that the '38th' number is wrong, not the 38th testcase. So actually another testcase "0011" is giving you the WA. Your code is giving the output as "2 4" while the correct output is actually "2 8". That is why the wrong answer statement is written as -> "wrong answer 38th numbers differ — expected: '8', found: '4'"
ahh I see, thanks man !
Auto comment: topic has been updated by Don_quixxote (previous revision, new revision, compare).