lucky-bai / projecteuler-solutions Goto Github PK
View Code? Open in Web Editor NEWNumerical answers to all Project Euler problems
License: MIT License
Numerical answers to all Project Euler problems
License: MIT License
Or maybe you can give me the auth to create a pull request?
My answer is 2868997, which is in the same ballpark as yours, but it's a different number.
Now, I don't know how you arrived at your solution, but I wrote a fairly straightforward Haskell program that generates all segments, then pairs them up and then checks each pair if they form a true intersection. It is quite slow, but I don't see how it can be incorrect.
If requested, I can show my code, it is quite short and self-explanatory.
Note that Project Nayuki does not have a solution for this problem.
984183023
1884138010064752
124136381
This is the graph of fastest solvers of the currently-only problem that has less than 100 solvers. (Problem 696)
The horizontal line is the time the solution is committed. (cf08a03) The vertical axis is the time (in seconds) since the problem is posted, the horizontal axis is the number of people solved the problem.
I am not that good at statistics to see what's the probability of that happening by chance, but it is pretty clear just by looking at it.
If you insists on posting the answers despite PE's rules, at least don't post them before the fastest solvers table is finished.
83985379
3807504276997394
I have 807 too but will wait for 100 solvers
While I wait for 807 to get more solvers, here is 809:
75353432948733
So users can check their solutions without spoiling them.
Here is a method to generate hashes.
First I convert Solutions.md into a machine-readable form (with unix newlines) where line n is just the solution string for problem n.
cat Solutions.md | dos2unix | tail -n +6 | head -n -2 | perl -pe 's/^[0-9]+\.//gm' | awk '{$1=$1}1' > solutions.txt
Then create a file with a md5 hash of the solution string if it exists, else a blank line.
while read -r line; do if [ -z $line ] ; then echo; else echo -n $line | md5sum | cut -f1 -d ' '; fi; done < solutions.txt > project_euler_md5.txt
Here is the md5 list https://gist.github.com/jxu/4a36e1752a27fb6506ac0927c09bd5fb
To check your answer for problem n, you can manually hash your answer and check against the md5 file:
$ sed '10q;d' project_euler_md5.txt
d915b2a9ac8749a6b837404815f1ae25
$ echo -n '1234' | md5sum | cut -f1 -d' '
81dc9bdb52d04dc20036dbd8313ed055
If you like the idea of adding this to the repo I can make a quick PR (probably with a python checker script for Windows friends)
1339784153569958487
0.5473261038334885555544628219
946791106 mod 1000000007
A solution has also got the process but an answer just has the final answer
If you posting euler project's solutions, then you completely destroy the whole idea.
148693670
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.