FrankKair / polyglot-euler

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

Go Lua 003 #42

Closed FrankKair closed 6 years ago

FrankKair commented 6 years ago

How the solution works

Keeps looping until half of the input number checking for odd numbers that don't divide the number. The last n is the biggest prime factor.

Performance

Go

Real time: 0.517 s
User time: 0.174 s
Sys. time: 0.157 s
CPU share: 63.94 %

Lua

Real time: 0.021 s
User time: 0.004 s
Sys. time: 0.016 s
CPU share: 92.30 %