N-th Prime

In this problem, you will have to print the n-th prime number. The first few prime numbers are given...

I Did Not Do the Assignment

Professor Petr is very angry over some of his students now-a-days for not doing assignment. He wants...

Exponential Growth

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

Laali Vs Bessie

One day Raju discovered USACO and from that day he would spend all his time solving problems. Laali ...

Easy Prime!

There are N numbers in an array. You will have Q queries. In each query, you can make 2 operations. ...

Chowdhury Saheb & the Numbers

You like short description of problems? Me too! Let’s go to an easy problem. You are given an array ...

Zacob The Batsman

It’s known that Zacob is a reliable batsman of LU CSE Cricket Team. Also as long as he is on the cre...

Prime Range

Prime Numbers are such numbers which are only divided by 1 and the number itself. 2, 3, 5, 7, 11, 13...

Is It a Perfect Square?

Given some numbers, can you tell, if the product of these numbers are a perfect square or not? A num...

Correct the Sieve

Sieve of Eratosthenes is a fast algorithm for finding prime numbers in larger ranges. According to W...

Left Prime

Prime numbers are the ones which can only be divided by 1 and the number itself. 2, 3, 5, 7, 11, 13 ...

Relatively Prime

Given a positive integer N, determine how many of the integers between 1 and N are co-prime with N. ...

Magician's Offer!

Rosi Vidmun is a greedy landlord who likes to grab as much land as he can. Currently he has P square...

Largest Prime

A positive integer number n is called a prime number, if it is only divisible by 1 and n itself, whe...

Arrange the Bricks!

You have N bricks two dimensional bricks of the dimension 1 \times 2. The bricks are rotatable i.e. ...

Ishtiaque and the Rabbit

Mr Ishtiaque is in trouble. A few months ago, he bought 2 rabbits. He wanted to have two pet rabbits...

Birthday Gift for SJ

Today is your best friend SJ’s birthday. You want to buy a birthday present for her. You want to buy...

Sofdor Ali and the Puzzle of Weights

Sofdor Ali is one of the most famous scientists of Bangladesh. He is also well known for his puzzle ...

Equation Equals Hazards

You are given the equation, GCD(A,M) = 1. You have to determine whether there exists at least one in...

Fast Co-Prime

Two numbers A and B are called co-prime if the only common positive factor of the two numbers is 1. ...