ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1255. Graveyard of the Cosa Nostra

Is this formula correct?
Posted by Alex Stoff 19 Oct 2005 00:24

Why are these(n div k)*n+(n div k)*(n mod k), n*n div k not right?

Show me my mistake.

Thanks a lot.
Re: Is this formula correct?
Posted by Seyyed Mehran Kholdi 16 Jan 2008 17:38
Test it for:
5 3
the answer must be 8 but this formula gets 7
Re: Is this formula correct?
Posted by ONU_Latysh 7 Nov 2011 19:28
Seyyed Mehran Kholdi wrote 16 January 2008 17:38
Test it for:
5 3
the answer must be 8 but this formula gets 7

can you explain why is it 8!
Re: Is this formula correct?
Posted by morbidel 7 Nov 2011 20:46
You can place 8 coffins like this:
1 2 3 3 3
1 2 4 4 4
1 2 0 5 6
7 7 7 5 6
8 8 8 5 6
Re: Is this formula correct?
Posted by ONU_Latysh 8 Nov 2011 00:30
yeah))
thanks a lot!
that was a fast response
did you get AC on this problem?
Re: Is this formula correct?
Posted by morbidel 8 Nov 2011 03:22
Yes, 8 years ago :)

Edited by author 08.11.2011 03:23