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 - January, 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 Palindrome Medium
MathNumber Theory
62 Prime Subtraction Operation Medium
ArrayMathBinary Search
63 Replace Non-Coprime Numbers in Array Hard
ArrayMathStack
64 Simplified Fractions Medium
MathStringNumber Theory
65 Smallest Divisible Digit Product II Hard
MathStringBacktracking
66 Smallest Even Multiple Easy
MathNumber Theory
67 Smallest Value After Replacing With Sum of Prime Factors Medium
MathSimulationNumber Theory
68 Sorted GCD Pair Queries Hard
ArrayHash TableMath
69 Split the Array to Make Coprime Products Hard
ArrayHash TableMath
70 Sum of Largest Prime Substrings Medium
Hash TableMathString
71 The kth Factor of n Medium
MathNumber Theory
72 The Number of Good Subsets Hard
ArrayHash TableMath
73 Three Divisors Easy
MathEnumerationNumber Theory
74 Tree of Coprimes Hard
ArrayMathTree
75 Ugly Number III Medium
MathBinary SearchCombinatorics
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.