metadata
language:
- en
pretty_name: Project Euler Problems
tags:
- code
size_categories:
- n<1k
configs:
- config_name: default
data_files:
- split: full
path: data/full-*
- split: train
path: data/train-*
- split: test
path: data/test-*
- split: easy
path: data/easy-*
- split: medium
path: data/medium-*
- split: hard
path: data/hard-*
- split: early_problems
path: data/early_problems-*
- split: later_problems
path: data/later_problems-*
- split: sample
path: data/sample-*
dataset_info:
features:
- name: id
dtype: int32
- name: title
dtype: string
- name: problem
dtype: string
- name: question_latex
dtype: string
- name: question_html
dtype: string
- name: numerical_answer
dtype: string
- name: pub_date
dtype: string
- name: solved_by
dtype: string
- name: diff_rate
dtype: string
- name: difficulty
dtype: string
splits:
- name: full
num_bytes: 2322335.230603448
num_examples: 918
- name: train
num_bytes: 1856856.2737068965
num_examples: 734
- name: test
num_bytes: 465478.9568965517
num_examples: 184
- name: easy
num_bytes: 700748.2122844828
num_examples: 277
- name: medium
num_bytes: 850005.051724138
num_examples: 336
- name: hard
num_bytes: 771581.9665948276
num_examples: 305
- name: early_problems
num_bytes: 1173816.5
num_examples: 464
- name: later_problems
num_bytes: 1148518.7306034483
num_examples: 454
- name: sample
num_bytes: 126488.84698275862
num_examples: 50
download_size: 5161799
dataset_size: 9415829.769396551
Project Euler Problems Dataset
A comprehensive collection of mathematical and programming challenges from Project Euler (projecteuler.net), organized for machine learning and educational purposes.
Dataset Description
This dataset contains 918 problems from Project Euler, a series of challenging mathematical/computer programming problems that require creative problem-solving approaches.
Features
- id: Problem number (integer)
- title: Problem title
- problem: Plain text version of the problem statement
- question_latex: LaTeX formatted problem statement
- question_html: HTML formatted problem statement
- numerical_answer: The correct numerical answer
- pub_date: Publication date
- solved_by: Number of people who have solved the problem
- diff_rate: Difficulty rating (percentage of users who solved it)
Splits
The dataset provides several splits for different use cases:
- train/test: Standard 80/10/10 split for machine learning
- train: 734 problems
- test: 184 problems
- easy/medium/hard: Problems grouped by difficulty level
- easy: 277 problems (>25% solve rate)
- medium: 336 problems (5-25% solve rate)
- hard: 305 problems (≤5% solve rate)
- early_problems/later_problems: First half vs. second half of problems by ID
- early_problems: 464 problems
- later_problems: 454 problems
- sample: A random selection of 50 problems for quick experimentation
Usage
from datasets import load_dataset
# Load the entire dataset with all splits
dataset = load_dataset("alexandnian/project-euler")
# Work with specific splits
train_problems = dataset["train"]
hard_problems = dataset["hard"]
sample_problems = dataset["sample"]
# Example: Get a problem
problem = train_problems[0]
print(f"Problem #{problem["id"]}: {problem["title"]}")
print(problem["problem"])
print(f"Answer: {problem["numerical_answer"]}")
Potential Applications
- Training math problem-solving models
- Generating solutions or solution approaches
- Testing reasoning capabilities of language models
- Educational tools for learning algorithmic thinking
Citation & License
This dataset is provided for research and educational purposes. Project Euler problems are from projecteuler.net.