Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Project Euler Problem 12
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DtY




PostPosted: Sat Oct 24, 2009 8:44 am   Post subject: Project Euler Problem 12

I got to what I thought was the right answer, but it's telling me I'm wrong.

[answer removed by request]

The answer it gives me is x with y factors, but euler tells me that's wrong.
I don't know exactly what code I can post for this, but if anyone has any ideas what I might be doing wrong it would be appreciated. (Or what code I can post that might be relevant).

Thanks

[edit] Sorry, meant to add link: http://projecteuler.net/index.php?section=problems&id=12
Sponsor
Sponsor
Sponsor
sponsor
zylum




PostPosted: Sun Oct 25, 2009 12:10 pm   Post subject: RE:Project Euler Problem 12

You are to give the value of the triangle number not which one it is. ie 28 not 5. (hint: you have the correct answer)
A.J




PostPosted: Sun Oct 25, 2009 6:11 pm   Post subject: RE:Project Euler Problem 12

Also, notice that the nth triangle number is merely the sum of the first n natural numbers. There's a closed form for that.

You actually do have the right answer.
DtY




PostPosted: Sun Oct 25, 2009 6:42 pm   Post subject: RE:Project Euler Problem 12

Thanks both Very Happy
I guess I should get the answer taken out of the post then

[edit] Note to moderators: I just reported zylum's post because I cannot report my own, and was expecting to be able to enter a report message. Could you edit my original post so that it doesn't have the answer?
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: