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 1502. Domino Dots

My formula
Posted by PrankMaN 23 Aug 2011 18:25
Answer for n is n*(n+1)/2*(n+2)

For example if n=2 then answer is 2*3/2*4=12
Re: My formula
Posted by Soucup Adrian 3 Feb 2012 17:24
The formula is correct and is easily proven by solving the sums:

sum(i=0 -> N) sum(j=0 -> N) (i + j)

Edited by author 03.02.2012 17:25
Re: My formula
Posted by Bogatyr 16 Oct 2012 15:22
Actually the inner sum needs to start at i, not at zero.   Starting at 0 counts non-double dominoes twice.