## RSA Algorithm in Cryptography

filter_none edit close play_arrow link brightness_4 code # Write Python3 code here from decimal import Decimal def gcd(a,b): if b==0: return a else: return… Read More »

- Ternary number system or Base 3 numbers
- Find all divisors of first N natural numbers
- Find the largest composite number that divides N but is strictly lesser than N
- Check whether count of odd and even factors of a number are equal
- Split N natural numbers into two sets having GCD of their sums greater than 1
- Count of unique digits in a given number N
- Check if a number is Prime, Semi-Prime or Composite for very large numbers
- Split a number as sum of K numbers which are not divisible by K
- Transform N to Minimum possible value
- Sum of GCD of all numbers upto N with N itself
- Program to Convert Octal to Hexadecimal
- Count of perfect squares of given length
- Find two numbers whose difference of fourth power is equal to N
- Largest number M less than N such that XOR of M and N is even
- Count of nodes having odd divisors in the given subtree for Q queries
- Check if N can be expressed as product of 3 distinct numbers
- Determine whether the given integer N is a Peculiar Number or not
- Sum of Hamming difference of consecutive numbers from 0 to N | Set 2
- Sum of product of all subsets formed by only divisors of N
- Count of triplets in a given Array having GCD K
- Check if N can be obtained by repetitive addition or subtraction of two given numbers
- Sum of all divisors from 1 to N | Set 2
- Check if all Prime factors of number N are unique or not
- Find K numbers with sum equal to N and sum of their squares maximized
- Last digit in a power of 2
- Count all prime numbers in a given range whose sum of digits is also prime
- Program to Convert BCD number into Decimal number
- Count of subsequences of length 4 in form (x, x, x+1, x+1) | Set 2
- Find pairs of elements from two different arrays whose product is a perfect square
- Find if it is possible to make all elements of an array equal by the given operations

filter_none edit close play_arrow link brightness_4 code # Write Python3 code here from decimal import Decimal def gcd(a,b): if b==0: return a else: return… Read More »

Given a number n, find all generators of cyclic additive group under modulo n. Generator of a set {0, 1, … n-1} is an element… Read More »

Goldbach’s conjecture is one of the oldest and best-known unsolved problems in number theory of mathematics. Every even integer greater than 2 can be expressed… Read More »

Given four numbers A, B, C and M, where M is prime number. Our task is to find ABC (mod M). Example: Input : A… Read More »

A number of the form 2x + 1 (where x > 0) is prime if and only if x is a power of 2, i.e.,… Read More »

Given two integer numbers, the task is to find count of all common divisors of given numbers? Examples : Input : a = 12, b… Read More »

Given a natural number, calculate sum of all its proper divisors. A proper divisor of a natural number is the divisor that is strictly less… Read More »

Given a number n, we need to find the sum of its digits such that: If n < 10 digSum(n) = n Else digSum(n) =… Read More »

ACM ICPC(Association for Computing Machinery – International Collegiate Programming Contest) is a world-wide annual multi-tiered programming contest being organized for over thirteen years. The contest… Read More »

A number n is said to be a Carmichael number if it satisfies the following modular arithmetic condition: power(b, n-1) MOD n = 1, for… Read More »

Given a positive integer n, and that it is composite, find a divisor of it. Example: Input: n = 12; Output: 2 [OR 3 OR… Read More »

Given a large number n and a prime p, how to efficiently compute n! % p? Examples : Input: n = 5, p = 13… Read More »

In this post “Important top 10 algorithms and data structures for competitive coding “. Topics : Graph algorithms Dynamic programming Searching and Sorting: Number theory… Read More »

Given a number n, check if it is prime or not. We have introduced and discussed School and Fermat methods for primality testing. Primality Test… Read More »

Given a number n, check if it is prime or not. We have introduced and discussed School method for primality testing in Set 1. Primality… Read More »