N'th Prime

In this problem, you will have to print the nth prime number. Th...

Exponential Growth

You will be given two integers X and N, you have to calculate XN...

Magic Number

Jack loves to play with numbers. One day, while he was playing w...

Correct the Sieve

Sieve of Eratosthenes is a fast algorithm for finding prime numb...

The Game Is Back On

Moriarty is bored again. When he gets bored, the only thing he w...

Easy Prime!

There are N numbers in an array. You will have Q queries. In eac...

Ishtiaque and the Rabbit

Mr Ishtiaque is in trouble. A few months ago, he bought 2 rabbit...

Challenging Lover

Greetings to all of you. You must have heard about our star prog...

Life of Phi

The Great Khami is learning Number Theory. He is very excited to...

Largest Prime

A positive integer number n is called a prime number, if it is o...

Unique Relief

Thanos has now figured out how to visit all the houses in the fl...

Is It A Square?

Shikamaru is the most brilliant student of his class. He is ve...

Fast Co-Prime

Two numbers A and B are called co-prime if the only common posit...

Left Prime

Prime numbers are the ones which can only be divided by 1 and th...

Birthday Gift for SJ

Today is your best friend SJ’s birthday. You want to buy a birth...

Sofdor Ali and the Puzzle of Weights

Sofdor Ali is one of the most famous scientists of Bangladesh. H...

Magician's Offer!

Rosi Vidmun is a greedy landlord who likes to grab as much land ...

Equation Equals Hazards

You are given the equation, GCD(A,M) = 1. You have to determine ...

Meera and Solo Chocolates

Meera bought candies from the store. She is now going to distrib...

Co-Prime Enemy Pair

Two integers A and B are known as co-prime or relatively prime i...

Secret Meeting

The world is terrified by Pandas! After a miraculous chemical ex...

Oh Functions

Let’s define functions f and g as: f(x) = 2 * ( f(x-1) + g(x-1)...

Christmas Tree

Professor Rio has an amazing Christmas tree. Unlike other trees,...

Chowdhury Saheb & the Numbers

You like short description of problems? Me too! Let’s go to an e...

Love Letters!

Lately Fahim is getting a lot of love letters. A LOT of love let...

Zacob The Batsman

It’s known that Zacob is a reliable batsman of LU CSE Cricket Te...

Laali Vs Bessie

One day Raju discovered USACO and from that day he would spend a...

Meena O Dosto Sele

Dosto sele Dipu and his friends used to disturb Rita Apu everyda...

Trick or Trees

One day, Raju was out roaming in the woods,when he suddenly stum...

Birthday Surprise

Adnan bhai, Priyom dada and Shuvo bhai are the members of MU_Khe...

A GRE Themed Contest Problem

Sadman and Najkin were solving a GRE math problem, Rejbah anothe...

Relatively Prime

Given a positive integer N, determine how many of the integers b...

Related Categories
Tutorials
Sieve of Eratosthenes

A beginner's number theory tutorial on Sieve of Eratosthenes.

Euler's Totient Function

If you are given a number N, you have to determine how many integers between 1 and N have a GCD of 1 with N.