Competitive programming coding challenges

Practise competitive programming with 35 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Easy · 7 Medium · 16 Hard · 12

Skills you'll practise: Big number arithmeticPrimality testingCycle detectionDigit manipulationMemoizationModular arithmeticPair enumeration2D grid traversalArea calculationBase conversionBitmask DPBlock skipping
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
341
Challenges
245
Solutions shared
9
Languages

All challenges

Search by name or topic, or filter by difficulty.

35 challenges
Easy

Self Powers Tail

Find the last k digits of 1^1 + 2^2 + ... + n^n.

You'll learn Modular arithmeticFast exponentiation
BeginnerBig integersCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Hard

Digit Factorial Chains

Count starting numbers whose digit factorial chain has exactly a given number of distinct terms.

You'll learn Cycle detectionMemoization
AdvancedCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Easy

Distinct Powers

Count the different values of a to the power b for a and b in a range.

You'll learn Perfect powersSets
BeginnerCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Medium

Name Scores

Sort a list of names and add up each name's letter value times its position.

You'll learn Sorting stringsCharacter codes
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Easy

Double-Base Palindromes

Add up the numbers that read the same both ways in base 10 and in a second base.

You'll learn Base conversionPalindromes
BeginnerCompetitive-programmingNumber-theoryPalindromesProject Euler stylemath
No solutions yet
Medium

Pandigital Products

Add up the products whose equation a × b = c uses the digits 1 to n exactly once.

You'll learn PermutationsSplitting strings
Competitive-programmingDynamic-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Medium

Champernowne Digits

Find digits at given positions of the string 123456789101112... made by writing out the counting numbers.

You'll learn Digit countingBlock skipping
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Medium

Truncatable Primes

List the primes up to a limit that stay prime as digits are removed from either end.

You'll learn Primality testingNumber truncation
Competitive-programmingIntermediateNumber-theoryPrimesProject Euler stylemath
No solutions yet
Medium

Lexicographic Permutation

Find the k-th arrangement of some distinct characters in dictionary order.

You'll learn Factorial number systemCombinatorics
Competitive-programmingIntermediateNumber-theoryProject Euler styleRecursionmath
No solutions yet
Medium

Sum of Big Numbers

Add up a list of numbers too long for any built-in integer type.

You'll learn Big number arithmeticString processing
Big integersCompetitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Medium

Circular Primes

Count the primes up to a limit whose every digit rotation is also prime.

You'll learn Primality testingDigit rotation
Competitive-programmingIntermediateNumber-theoryPrimesProject Euler stylemath
No solutions yet
Medium

Quadratic Primes

Find the quadratic n² + an + b that gives the longest run of primes from n = 0.

You'll learn Primality testingBrute-force search
Competitive-programmingIntermediateNumber-theoryPrimesProject Euler stylemath
No solutions yet
Medium

Counting Sundays

Count the months in a range of years that begin on a Sunday.

You'll learn Date arithmeticModular arithmetic
Competitive-programmingDates and timesIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Hard

Non-Abundant Sums

Add up the numbers up to a limit that cannot be written as the sum of two abundant numbers.

You'll learn Divisor sievePair enumeration
AdvancedCompetitive-programmingNumber-theoryPrimesProject Euler stylemath
No solutions yet
Medium

Number Letter Counts

Count the letters needed to write every number from 1 to n in English words.

You'll learn String buildingBreaking numbers into parts
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Medium

Pentagonal Pair

Count pairs of pentagonal numbers whose sum is pentagonal too.

You'll learn Integer square rootsPair enumeration
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Medium

Highly Divisible Triangular Number

Find the first triangular number that has at least d divisors.

You'll learn Prime factorizationDivisor counting
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet