GCD Plus LCM

In this problem you will be given two integers a, b. You have to answer if GCD(a, b) + LCM(a, b) = a...

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

N-th Prime

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

Trust Me , You Can Solve It ;-)

Nafis Shahriar loves to do codeforces programming contests. He is the first candidate master in code...

Largest Prime

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

Fast Co-Prime

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

Equation Equals Hazards

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

Correct the Sieve

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

Magic Number

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

Left Prime

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

Is It A Square?

Shikamaru is the most brilliant student of his class. He is very good at Mathematics. Mr. Asuma is t...

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

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

K-Th Root

You will be given Q queries. In each query, you will be given two positive integers A and B. You hav...

Love Letters!

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

Relatively Prime

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

The Easiest Problem

Tareq Abrar is a lazy programmer. He has a friend named Aminvai, who is famous for his amazing skill...

Sum of GCD and LCM

The greatest common divisor (GCD) of two integers, is the largest integer that divides both of the i...

The Story of Two Friends

There are two friends F1 and F2 in a city. They both are student of FCB High School. Also, they resi...

NAC-SAC Game! (Easy)

Akash and Guru are playing an interesting game. They are standing at the two ends of the NAC-SAC bri...