A bunch of optimizations are possible like caching via hashing PDS numbers
as u find for prior inputs so that some of those can be used for next
inputs, etc. But first try to develop a simple algorithm.

-Vandana

On Fri, Apr 20, 2012 at 2:48 PM, Vandana Bachani <vandana....@gmail.com>wrote:

> hi Amrit,
> First you should try to write a module (function) which identifies if a
> number is a PDS number, basically given a number it checks whether the
> product of its digits is divisible by the sum of its digits.
> Then you should start an infinite loop and keep counting the PDS number u
> encounter starting from 1, until the count is N (as given in the input).
> You need to repeat this until the input is exhausted (i.e. the input is
> zero).
> Gather the inputs in an array first and then run the whole process on the
> array.
>
> Thanks,
> Vandana
>
> On Fri, Apr 20, 2012 at 1:19 PM, amrit harry <dabbcomput...@gmail.com>wrote:
>
>> http://www.codechef.com/APRIL12/problems/PDSNUM
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/6NhjBLnaw0AJ.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Vandana Bachani
> Graduate Student, MSCE
> Computer Science & Engineering Department
> Texas A&M University, College Station
>
>


-- 
Vandana Bachani
Graduate Student, MSCE
Computer Science & Engineering Department
Texas A&M University, College Station

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to