Hi everbody , i am trying to solve this problem
http://acm.uva.es/p/v105/10527.html  but i am not getting any
efficient algorithm . One algorithm i applied
while(n>9)
 for i=2 to 9
   if(n%i=0)//then i is factor of n and may be a digit in the number
       store i for further processing
       n=n/i

now the problem with this algorithm is supose we have input  45
so answer should be 59 as from defintion
59 -> 45

but my algorithm is giving the answer is 335
as 335 -> 45
but i have to find out minimum number .Kindly help me . Thnkx in
advance .


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to