hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Confused on what a challenge is asking?
Goto page Previous  1, 2, 3, 4
 
Reply to topic    hacker.org Forum Index » Challenges View previous topic
View next topic
Confused on what a challenge is asking?
Author Message
CodeX



Joined: 17 Oct 2008
Posts: 350

Post Reply with quote
it means that they would be adding the numbers 1 to 2118 together but whenever the number is a perfect square it gets added twice so here would be the first few steps:
Code:
 n   1 2 3 4  5  6  7  8  9  10  ...
squ  y n n y  n  n  n  n  y  n   ...
sum  2 3 6 14 19 25 32 40 58 68  ...
where squ is y for square numbers and n if they aren't. 1,4 & 9 are added twice (total += 2*n) because they are 1^2, 2^2 & 3^2 respectively
Tue Mar 29, 2011 2:58 pm View user's profile Send private message
bodjo



Joined: 26 Feb 2011
Posts: 37
Location: tunisia

Post rabbits everywhere Reply with quote
it is embarrasing to be here again Embarassed
i think i should work more on my english skills but till that time i will gladely accept any explanation for"the sum of 10th through 17th(rxclusive)
Sun Apr 10, 2011 4:42 pm View user's profile Send private message
CodeX



Joined: 17 Oct 2008
Posts: 350

Post Reply with quote
for example: the sum of the 1st through 5th (exclusive) natural numbers is 2+3+4=9 as the first five natural numbers are 1,2,3,4,5. Exclusive means don't include the end points i.e. start < n < end instead of start <= n <= end which would be inclusive
Sun Apr 10, 2011 5:13 pm View user's profile Send private message
tompko



Joined: 25 Feb 2011
Posts: 11
Location: London, UK

Post Reply with quote
It means the sum of the items starting at the 10th and ending at the 17th, including the 10th and 17th items.
So if you have the following sequence:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
Then the sum of the 10th through 17th (inclusive) would be 108.
Sun Apr 10, 2011 5:25 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Challenges All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.