Number Theory Coding Problems

Prime numbers, GCD, and modular arithmetic

76
Total Problems
11
Easy
33
Medium
32
Hard
Start Practicing
πφgcdmod

Master DSA Topics - March, 2026

Practice problems across 75+ categories

Number Theory Coding Problems

Practice problems frequently asked at Number Theory 76 problems | 11 Easy | 33 Medium | 32 Hard

# Problem Difficulty Topics
61 Prime Pairs With Target Sum Medium
ArrayMathEnumeration
62 Prime Palindrome Medium
MathNumber Theory
63 Prime Subtraction Operation Medium
ArrayMathBinary Search
64 Replace Non-Coprime Numbers in Array Hard
ArrayMathStack
65 Simplified Fractions Medium
MathStringNumber Theory
66 Smallest Divisible Digit Product II Hard
MathStringBacktracking
67 Smallest Even Multiple Easy
MathNumber Theory
68 Smallest Value After Replacing With Sum of Prime Factors Medium
MathSimulationNumber Theory
69 Sorted GCD Pair Queries Hard
ArrayHash TableMath
70 Split the Array to Make Coprime Products Hard
ArrayHash TableMath
71 Sum of Largest Prime Substrings Medium
Hash TableMathString
72 The kth Factor of n Medium
MathNumber Theory
73 The Number of Good Subsets Hard
ArrayHash TableMath
74 Three Divisors Easy
MathEnumerationNumber Theory
75 Tree of Coprimes Hard
ArrayMathTree
Showing 61-75 of 76
1 ... 3 4 5 6

Tutorials Library

Master any technology with our largest free online Library. Browse through 500+ tutorials across 10+ categories.

Python

Python Tutorial

Java

Java Tutorial

JavaScript

JavaScript

C++

C++ Tutorial

C#

C# Tutorial

Go

Go Tutorial

Rust

Rust Tutorial

TypeScript

TypeScript

Swift

Swift Tutorial

Kotlin

Kotlin Tutorial

Ruby

Ruby Tutorial

PHP

PHP Tutorial

C

C Tutorial

Scala

Scala Tutorial

Perl

Perl Tutorial

R

R Tutorial

Dart

Dart Tutorial

Lua

Lua Tutorial

MATLAB

MATLAB

Haskell

Haskell

Developer Toolbox

Powerful online tools to boost your productivity

public class MyFirstJavaProgram { Edit & Run

   /* This is my first java program.
    * This will print 'Hello, World!' as the output
    */

   public static void main(String []args) {
      System.out.println("Hello, World!"); // prints
   }
}

Start Coding in Seconds

Coding Ground For Developers

Code, Edit, Run and Share

Ignite your coding potential on Coding Ground - an immersive online platform for hands-on learning, collaboration, and skill development.