math problem | Sololearn: Learn to code for FREE!


math problem

Anyone can help me?🙏 Enter n x+y*2+z*5=n print number of answer (x,y,z) ex:input 5 output 4(5,0,0)(1,2,0)(3,1,0)(0,0,1)

7/12/2018 12:49:25 PM


6 Answers

New Answer


Any limitations for x, y, z?


Good challenge. This code can solve it, but I've been problems with it.


I think it's asking how many combinations of xyz will result n=5 and to list those combinations.


Janning⭐ no,enter n and print number of answers xyz😥 so if you input 5 the output is 4


Yes, because there are four possible combinations of xyz where n is five.


no limit!