Page 1 of 1

### Easy Coding Contest-9 Editorial Posted: Sat Feb 25, 2017 2:32 pm
Problem A: Vely Easy Problem
Problem Setter: Bishal Gautam

You are given string determine whether it contain 'r' or not
Idea: We may use boolean flag variable and make it 'false' initially.Then after iterating on string if we find 'r' character then makes
flag 'true'. so, finally if flag is true , we have to print "Vely easy" otherwise "Not vely easy".

Problem B: Find the Intersection
Problem Setter: Jaber Kibria

Given S sets and distinct numbers in each set, find and print the numbers in their intersection.
Idea:
This problem is about string parsing and some maths. there is not mentioned how many elements are there in a particular set. So, we may use "stringstream" in c++ to parse string into integers.
Then, for every elemnts in the set way will increase counter in STL map for occurance.
Finally, iterating all possible elements, if we found counter is equal to N, then this element must be present in all set, eventually intersection of all set.

Problem C: Too Easy
Problem Setter: Sifat Rabbi

You are given a number N upto 100000 digits. You have to find N modulo 100000.
Idea: You have to print last last 5 digits skiping printing any leading zeros. For this, if length of N is less than 5 directly output it without printing 0 at th begining and if length is greater than 5 ,just keep last 5 digits and do the same work. For skipping of printing of leading 0, you may use boolean flag variable.

Problem D: Divisor - Multiple
Problem Setter: Feroz Ahmmed

Given two integers A and B. Find the number of values that are multiple of A and divisor of B.
Idea:
For multiple of A (say M=A*X ) to be divisor of B ( i.e B%(A*X)==0 ), B must be divisible by A.
So, if B is not divisible by A, then answer will be 0.
otherwise, we have total options which is equal to number of divisors of B/A .
So, answer will be number of divisors of B/A.
we can calculate numbers of divisors by iterating upto square root of (B/A). So, overall complexity is: O( TC*sqrt(B/A) ).

Problem E: Modified Golbach's Conjecture