Hey guys, in this problem [Problem - A - Codeforces] we are asked to find 1 good integer(which is divisible by A*B) and 2 good integers (which are divisible by only A) and also print YES or NO(if not possible)…
such that X+Y=Z.
Pretty easy and straight forward but I was getting wrong answer and today I watched the tutorials and everyone was printing NO when (B==1) and I get AC when I wrote this…but My question is if
A=12 and B=6 then there is NO possible X,Y,Z. Because every integer which is divisible by 12 is divisible by 6…
I used the test case on CORRECT solution and I got answers as :
YES
72 12 84
but here 12 and 84 both are divisible by 6…
Please tell me whether I am not able to understanding the Question or EXPLAIN ME THIS.
Condition was on A and AB. Two of them must be divisible by A and not by AB. Remainging one should be divisible by A*B
THANKS…I just misunderstood the question …
Thanks for helping