N'th Prime

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

Ishtiaque and the Rabbit

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

Correct the Sieve

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

Easy Prime!

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

Tree Business

To become economically stable, Saturn has come up with a new kind of business, tree business. At fi...

I Am Good

I am trying to become a good guy, because it doesn’t take money to become good. So here’s a short an...

Crypto-Number

Walt and Gus have a great rivalry. Recently Gus has developed a cryptographic system. Walt is trying...

Exponential Growth

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

Modulo

Let’s get straight into the problem. In ths problem, here will be multiple test cases. In each test ...

Rivalry Friends

Ryo and his girlfriend love to think about challenges. One day his girlfriend gave him a challenge t...

Quarantine!!!

China is one of the strongest countries in the world in the sense of economy and military technology...

Left Prime

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

Love Letters!

Lately Fahim is getting a lot of love letters. A LOT of love letters. Since he is confused about whi...

Magic Number

Jack loves to play with numbers. One day, while he was playing with numbers he found something inter...

Tom Is a Good Mentor

Today is the first day of the little mouse Jerry at school. Famous mathematician Tom is his teacher....

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

A Lack of Common Divisors

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

Fast Co-Prime

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

Is It a Perfect Square?

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

Lucky Shirt

Marjokes is a very famous comedy personality in Byteland. He is a poet, a writer, a singer and an ac...

Life of Phi II

You will be given two integers n and m where GCD(n, m) = 1. You have to tell that how many numbers a...

Largest Prime

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

Challenging Lover

Greetings to all of you. You must have heard about our star programmer Rafat bhai. One day he went o...

Relatively Prime

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

Kitchen Decorate

Shira has now decided to decorate her kitchen of height H and width W more precisely, she wants to ...

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

Magician's Offer!

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

Equation Equals Hazards

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

Meera and Solo Chocolates

Meera bought candies from the store. She is now going to distribute those among her N friends. She m...

Co-Prime Enemy Pair

Two integers A and B are known as co-prime or relatively prime if their greatest common divisor GCD ...

Secret Meeting

The world is terrified by Pandas! After a miraculous chemical explosion, they became smarter; and ev...