Chocolate Bar | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Chocolate Bar

Chocolate bar has the form of a rectangle divided into n×m portions. Chocolate bar can be split into two rectangular parts by breaking it along a selected straight line on its pattern. Determine whether it is possible to split it so that one of the parts will have exactly k squares. The program reads three integers: n, m, and k. It should print YES or NO. Can anyone please explain to me the equation to do this program! :)

1st Feb 2021, 5:13 PM
Ailana
Ailana - avatar
2 Answers
1st Feb 2021, 5:24 PM
Bartika🎶
Bartika🎶 - avatar
+ 1
YUp absolutely correct! Thanks!
1st Feb 2021, 5:36 PM
Ailana
Ailana - avatar