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

PrankMaN My formula [2] // Problem 1502. Domino Dots 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
Soucup Adrian Re: My formula [1] // Problem 1502. Domino Dots 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
Bogatyr Re: My formula // Problem 1502. Domino Dots 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.