Skip to content

kevinddchen/project-euler

Repository files navigation

project-euler

Introduction

These are my solutions to Project Euler problems. Please do not blindly copy numerical answers.

Most of the newer solutions are written in C++, and most of the older solutions are written in Python.

Running solutions

Clone this repo and run the commands below to install third-party dependencies. For C++, this downloads Eigen, which is a header-only library. For Python, this installs numpy and scipy. Note that we use the C++20 standard and Python version >= 3.9.

# install c++ third-party dependency
git submodule init
git submodule update

# install python third-party dependencies
pip install .

To run any solution, run the following command,

./run.sh $NUM

where $NUM is the problem number. If the solution is written in C++, this will compile and run the code.

EulerSolutions.pdf contains write-ups for problems that can be solved by hand.

Development

Install additional Python dependencies for development by running,

pip install -e .[dev]
pre-commit install

To run C++ and Python tests,

./run.sh tests

About

Project Euler solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages