ACT 1: Ash Counting Trees
Ash Ketchum has a weird rooted tree (read Notes sections if you don't know about tree data structure...
Largest Prime
A positive integer number n is called a prime number, if it is only divisible by 1 and n itself, whe...
Karim Meets Gollum
After hearing about Bilbo's Ring that he found in the Misty Mountains, Karim the Hobbit decided to e...
Mystery of Fibonacci
Fibonacci sequence is a recursive sequence that depends on the following definition: Fib(N) = Fib(N-...
Meena O Dosto Sele
Dosto sele Dipu and his friends used to disturb Rita Apu everyday on her way to school singing , " র...
Game Show
Alex is participating in a game show. Mr. Phil is the host of the game. Alex is provided with an arr...
Ishtiaque and the Rabbit
Mr Ishtiaque is in trouble. A few months ago, he bought 2 rabbits. He wanted to have two pet rabbits...
Arko and Special Permutations
Arko is very fond of permutations. He can easily calculate the number of n length permutations. (In ...
Beauty of AP
Solving problems is fun in competitive programming, right? So let’s solve a fun task today too :P. 1...
Perfect Points
Perfect lines are the lines y=mx+c such that m and c are positive integers. Perfect points are the p...
Poltu and Digit Product
You are given two integer L and R. You have to find the summation of digit product of all number fro...
Hange and Her Gear
Hange has developed a special gear to attack the Cart Titan. The gear is a round, disc-like object. ...
LCM
Given an integer $L$, you have to find the product of two different integers such that their LCM (Le...
Switches
Technology is going ahead very fast. How can we know what will we get in future? One day you met a g...
Hidden Graph
There is an unweighted, undirected hidden graph. You are given an integer range from L to R. There a...
GCD Grid
You are given two integers N and M. You have to make a grid of N∗M size by following these rules: E...
The Game Is Back On
Moriarty is bored again. When he gets bored, the only thing he wants to do is play with Sherlock. So...
Admission Gift
During admission exams in the city of RR (Royal Royal city), the students of RR University of Engine...
Composite Facts
Let's define two functions F and S: F(n) = 1 + n! S(n,m) = Sum of first m non-prime integers which ...
Is It Perfect
Bob has an initial array D of length n . Alice is a good friend of Bob. So Bob challenges Alice to f...
M-Sequence
A sequence is called M-sequence if after removing zero or more elements from the sequence the GCD of...
Mr Makor And His Friends
Mr Makor has a set S of n integers. He calls a sequence of length k special if every element of the ...
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...
No Onion, No Cry
-Onions make us cry, don't they? They can make us happy too. -How? -Read the statement carefully! I...
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...
Toph uses cookies. By continuing you agree to our Cookie Policy.