+ 3

Challenge ::: The Wonderbook.

You have a Wonderbook which has only two pages. If you write two natural numbers in these two pages and reopen the book, it erases them and returns you their product and sum. For example : If you write 4 and 5, the next time you open the book, the numbers become 20 and 9. Again you close the book and reopen to find they have changed to 180 and 29. 4,5=>9,20=>180,29 1,2=>2,3=>6,5 Make a program to find how many ways are there to appear a inputted number into the book without writing it.

12th Oct 2017, 1:57 PM
AlphaCoder
AlphaCoder - avatar
8 Answers
12th Oct 2017, 2:24 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
14th Oct 2017, 3:05 AM
Js Vargas
+ 1
If you input 5, 1,2=yes 1,4=yes 2,3=yes So, the answer is 3.
12th Oct 2017, 2:07 PM
AlphaCoder
AlphaCoder - avatar
+ 1
I'm in
12th Oct 2017, 3:14 PM
Js Vargas
13th Oct 2017, 7:28 PM
sayan chandra
sayan chandra - avatar
+ 1
@@ krisna sir.. default input is 9 there is no such combination as [1,9] in the o/p its valid--> 1*9=9
13th Oct 2017, 7:43 PM
sayan chandra
sayan chandra - avatar
0
so input I'll have one number? give a demo
12th Oct 2017, 2:00 PM
Morpheus
Morpheus - avatar
0
Great work. @krishna teja
12th Oct 2017, 3:00 PM
AlphaCoder
AlphaCoder - avatar