Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.18 KB

README.md

File metadata and controls

48 lines (34 loc) · 1.18 KB

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