Please read the new rule regarding the restriction on the use of AI tools. ×

_4C3_'s blog

By _4C3_, history, 8 years ago, In English

Hi, all.

I was trying this problem,

http://codeforces.net/problemset/problem/459/B

I can't figure out why my code is showing wrong answer.

WA code — http://codeforces.net/contest/459/submission/19670256

Please help!

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

count function will return an integer. So you are multiplying two integers, which will result an integer... not a long long... I guess.

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

    And by the way I guess you are missing the case when both maximum and minimum values are the same...