Project Euler - Ethics?

closed account (13bSLyTq)
Hi,

I am doing Project Euler and I got a quick question which I feel has been killing me for a while...

Well, I have been attempting to do some problems there and I am no mathamatician so I do not know all the equations and so on to find the answer to some solution so I usually rely on my loops (not bruteforce though) and simple logic although when I do come across some problems like find the LCM of all numbers from 1 to 20 (Problem 5) it gets difficult.

As I feel using only logic will improve me but I never used the formula:

LCM(A,B) = A*B / HCD(A,B)


I was taught to use the upside-down cake method, and only one can assume the logic is pretty complicated for example:

divide all numbers that can divide under 20 by a incremented number until they cannot. Every time we do this make the LCM = LCM * number and so on until it becomes too complicated and these other complicated strategies which just make the logic absolutely frustrating but incredibly annoying and something working on it for weeks due to complexity.

It may come easy to some but others may also find it hard anyway the thing is I want to ask is it better to find a equation that can easily find the answer to it or to sit there working on logic especially for something that is too complicated or does it just cross the Euler ethics for the site?





Last edited on
Not quite sure I understand what you're asking.

Would it help if you understood that formula better? Er, if understanding that formula is the issue. Sorry, I'm having trouble understanding your post.

I think he's asking if it is ethical to look up hints to help him solve the problems. If that is correct I see no ethical dilemma unless you are looking for full solutions and using them without attempting to work it out yourself.
closed account (13bSLyTq)
Oh thanks! I was feeling guilty for looking up formulas and looking at how they work but now that its clear.
I wouldn't even call looking up a full solution is unethical. There's no gain to completing problems, you just miss out on learning something.
If you don't look up formulae then you have a lifetime of pain ahead.

You'll need to make all the discoveries of people like Euler and Gauss for yourself. Then once you made the discovery on your own you can code it haha.

Good luck with that :P

Topic archived. No new replies allowed.