Difficulty : Cakewalk
Prerequisites : Basic Maths
The Problem link is here.
As per the problem, it is asked to find whether is it possible to subtract a prime number p
any number of times from a number b to get the number a (Both a and b are given as input, also a>b).
So, the logic is quite simple for the problem, i.e. we have to check whether the difference between the two numbers is greater than or equal to 2 (as 2 is the smallest prime no.).
My solution is given here.
If you find any error in my solution, kindly let me know.