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

imtinanjibon's blog

By imtinanjibon, history, 4 years ago, In English

I am trying to solve 478B - Random Teams . And here is my submission 81868059 . Logic is good but still gives wrong answer in 12th test case. before 12th case there was large integer input but answer was good. I have failed to understand whats wrong with this. How should i fix this?

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

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

Avoid using doubles if they are not needed. Here you can do everything on long longs.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Do not use doubles if avoidable, they are error prone.