EDITORIAL(Unofficial) - Prime Subtraction (Codeforces Div-2)

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.

1 Like

Change its name to “unofficial editorial” .

1 Like

Ok, provide an editorial on the EASIEST problem with thousands of solve, very productive! What’s your point here?

1 Like