integer right triangle
I was ashamed to review my old code, it is ugly. I brute-forced this problem, and used some unnecessary structure!
Pythagorean triples is the key to solve this problem.
Update: 06/18/2017
I read the discussion of this problem again and find square1001 proposed an optimization to solve this problem, which is two times faster than my solution at 1e8, good to know!
No comments:
Post a Comment