FrankKair / polyglot-euler

📜 Project Euler solutions in various programming languages
MIT License
74 stars 14 forks source link

Shell 028 #103

Closed fredericojordan closed 6 years ago

fredericojordan commented 6 years ago

This is the first Bash submission, so I'm also proposing a format for CONTRIBUTING.md. I'm also undecided if we should tag this as a bash or a shell script.

How the solution works

Problem 028

Performance

Unfortunately Try it online! won't let me run forking bash scripts, so I'll stick to using time

Freds-MacBook-Pro:polyglot-euler fredericojordan$ time src/028/p028.sh > /dev/null

real    0m1.706s
user    0m0.526s
sys 0m1.090s
fredericojordan commented 6 years ago

For the record, linguist considers this code as being shell code.