math problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

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)

12th Jul 2018, 12:49 PM
LetterC67
LetterC67 - avatar
6 Answers
+ 2
Any limitations for x, y, z?
12th Jul 2018, 2:36 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 1
Good challenge. This code can solve it, but I've been problems with it. https://code.sololearn.com/WsH6sKJSbbcA/?ref=app https://www.sololearn.com/discuss/1372325/?ref=app
13th Jul 2018, 12:24 AM
▲TopGun ▲
▲TopGun ▲ - avatar
0
I think it's asking how many combinations of xyz will result n=5 and to list those combinations.
12th Jul 2018, 12:58 PM
Janning⭐
Janning⭐ - avatar
0
Janning⭐ no,enter n and print number of answers xyz😥 so if you input 5 the output is 4
12th Jul 2018, 1:23 PM
LetterC67
LetterC67 - avatar
0
Yes, because there are four possible combinations of xyz where n is five.
12th Jul 2018, 1:54 PM
Janning⭐
Janning⭐ - avatar
0
no limit!
12th Jul 2018, 2:45 PM
LetterC67
LetterC67 - avatar