himanshu.red's blog

By himanshu.red, history, 2 years ago, In English

Today, I was doing this problem. I got wrong answer in this case. Here is the screenshot. Is it really wrong??

  • Vote: I like it
  • -12
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Yes.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Which one!! My code or the testcase conclusion?

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      You really think the test case is wrong?

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        Hey man!! I'm just a noob coder. May be I am not thinking it through. Please help me out.

»
2 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Your answer is probably 7 * (6 + 1), but you can't swap them so it's only 6 * (7 + 1).