Help Solving CONN program

,

I came across this problem (Rated 860)
I can’t Understand The Logic Behind It.
I Know That This Problem Will Require Us to FInd If n=(2x+7y)
Yet Even By looking UP the Previous Submissions I Can’t Understand How To Convert This Into Code LAnguage.