Donate SIGN UP

Whats the easy way of finding a total?

Avatar Image
banana | 08:58 Fri 19th Dec 2003 | How it Works
10 Answers
A quiz night question was - how many presents in total were given in the 12 days song? We had to do it the slow way , but Im sure there must be an alogrithm or other quick method of doing this calculation.Any ideas?
Gravatar

Answers

1 to 10 of 10rss feed

Best Answer

No best answer has yet been selected by banana. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
six times thirteen
Woofgang is right, but the formula is: smallest number plus largest number (1+12=13) multiplied by half the number of 'sets' (12/2=6). For an odd number you will obviously get a half somewhere in here, but it should still work.. This should work for any series of consecutive numbers. I just worked this out now, so if I am wrong in this, I shall slink away to my corner....
However... it doesn't help with the total number of presents given. The narrator of the song gets a partridge in a peartree on each day, so that's 12 gifts (let's go with tradition and assume a partridge and a peartree are a single gift and not two separate ones). Pus 11x2 turtledoves, 10x3 french hens, 9x4 colly birds... well, you get the picture.
Question Author
Wolfgang and Shybear ,you were both at the point where we were -before we realised that the total for every days presents was needed. Jenstar - thats a different way to how we did it.We had totalled cumulatively ( 1+3+6+10 etc ) but it was slow and prone to errors ( took about 6 goes before we both agreed).Ive looked on google but nothing has come up.I was thinking of something like 12 factorial ( but obviously not that exactly).Perhaps an easy way doesnt exist !
woofgang and shybear, I'm not sure how you get to 364 with that! 6x13 is 78. I also had it in a pub quiz, and just did 1x12 + 2x11 + 3x10... etc. Of course, you only have to do half and then multiply by two because the two halves are identical. But banana, I'm sure you're right about there being another way, a formula, because I dimly remember doing something like this for A-level all those years ago.
easy. total=0; numberofdays=12; foreach numberofdays as thisdaynumber { total += sum(0 to thisdaynumber); } print total;
I must be a bit of a simpleton, but I just added up 1 through 12 and it came to 80, BUT was this the correct answer?
Whoops....78
Don't forget, Marj, that each day not only does the recipient get the present for that day, but a reapeat of each of the previous days a well. E.g., on the 3rd day he receives 3 French hens, two turtle doves and a partridge in a pear tree. This adds to the two turtle doves and the two partidges in pear trees that he already has, having received them on days one and two. I hope that's clear!
The correct answer is in fact 364, not sure if there is a *simple* formula for working this out though, good luck!

1 to 10 of 10rss feed

Do you know the answer?

Whats the easy way of finding a total?

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.