Number Theory

16 problems to practice.

16 Total
3 Easy
11 Medium
2 Hard

Extended Euclidean Algorithm

You have been given two Integers a and b. you need to find an integral solution of x and y such that...

medium

Linear Diophantine Equation

You have been given three Integers a, b and k. you need to find an integral solution of x and y such...

medium

Eulers Totient Function

you have been given a number n, count the number of integers between 1 to n inclusive, which are co-...

hard

Wilsons Theorem

you have been given number n and p, you need to find n! % p (n factorial mod p). p is a prime no.

medium

Modular Fast Exponentiation

1. You are given a number x. 2. You are given another number n. 3. You are required to calculate x...

medium

Modular C(n,r)

You have T test cases and for each test case you have been given n and r values and you need to find...

medium

No Max No Min

You have an array with n elements. you have to create all subsequences of this array with length K....

hard

Prime Factors Using Sieve

you have T numbers and for each number N you want to print all of it's prime factors. Expected co...

medium

All Factors Using Sieve

Given t test cases and in each test case you have a positive integer n, we have to find the total nu...

medium

Count Of Common Divisors

Given two integer numbers, your task is to find count of all common divisors of given numbers

easy

Gcd Length

You are given three integers a,b and c. Find two positive integers x and y (x>0 & y>0) such...

medium

I Hate 1111

You are given an integer x. Can you make x by summing up some number of 11,111,1111,11111,..?(You ca...

medium

Relatively Prime Pairs

You are given a set of all integers from l to r inclusive (r - l is odd).You want to split these nu...

medium

Sum Of Factors

Given a number n, output the summation of all its proper Factors. Note: A proper Factor of a natu...

medium

Chinese Remainder Theorem

We are given a set of congruence equations. a = a1 (mod n1) a = a2 (mod n2) Where ai are some g...

easy

Monkey Tradition

In 'MonkeyLand', there is a traditional game called "Bamboo Climbing". The rules of the game are as...

easy