-
-
Save i-van/d79ec8035d8c4966aa29228023741d89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Candy weighs X grams, tangerine - Y grams and apple - Z grams. | |
Need to write a program that will determine how many different versions of gifts weighing exactly W grams can make Santa Claus. | |
Input data | |
Function should receive four integers X, Y, Z and W. | |
Output data | |
Function should return a single integer - the number of gift options. | |
Example: | |
X = 10 | |
Y = 25 | |
Z = 15 | |
W = 40 | |
Result: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment