Блог пользователя Don_quixxote

Автор Don_quixxote, история, 7 часов назад, По-английски

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 :(

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
7 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Don_quixxote (previous revision, new revision, compare).

»
7 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Don_quixxote (previous revision, new revision, compare).

»
7 часов назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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'"

»
3 минуты назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Don_quixxote (previous revision, new revision, compare).