FrankKair / polyglot-euler

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

C++ 004 #74

Closed caiangums closed 6 years ago

caiangums commented 6 years ago

How the solution works

Create two reverse for-loops from the last number (999) and decreasing. The second for-loop decrease just 100 numbers based on the first one.

There is a reverse number check function too, created with no strings conversions.

Performance

Try it online!

Real time: 0.331 s
User time: 0.259 s
Sys. time: 0.068 s
CPU share: 99.04 %
lucaspbordignon commented 6 years ago

Nice one! 👍