Rivalry Friends

Ryo and his girlfriend love to think about challenges. One day h...

N'th Prime

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

Fast Co-Prime

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

Magic Number

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

Is It a Perfect Square?

Given some numbers, can you tell, if the product of these number...

Challenging Lover

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

Exponential Growth

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

Left Prime

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

A Lack of Common Divisors

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

Is Bita Happy?

Bita has learned bitwise-operations recently. She is doing some ...

Easy Prime!

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

Modulo

Let’s get straight into the problem. In ths problem, here will b...

Solve This Giveaway Problem First

This problem is straightforward and easy. You will be given two...

Prime Range

Prime Numbers are such numbers which are only divided by 1 and t...

Birthday Gift for SJ

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

Phi Numbers in Range!

In number theory, Euler’s phi function, denoted as ϕ(n), is an a...

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)...

Largest Prime

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

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...

Christmas Tree

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

Is It A Square?

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

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...

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.