Doubt regardinf contest

the outpt is not right .please correct my code and send it to me

the problem statement-https://codeforces.com/contest/1519/problem/A

hello @Somasree

u can perform distribution more than one times.
this should be the logic->

if(  (min(R,B) * (D + 1) >=max(R, B ) ) 
              print  "YES" 
else :
              print "NO"

why is it (D+1) in the condition??

1 , d+1 // difference is d

so we distribute in this this way.
and becuase in total we will be perfoming min(r,b) operation.

the final value of pile will be min(r,b), min(r,b)* (d+1)

so from here we can say min(r,b)*(d+1) >= max(r,b) for valid distribution

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.