That's all the code I'm writing. As for the reference to line 182, I have
no idea since my code doesn't have line 182.
Also, as Peter wrote:
"The "topcoder" site is probably infested with the world view of Java where
every function is a method inside a class."
Topcoder seems too much in love wit
On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav
mailto:ritwikragha...@gmail.com>> wrote:
and the error is:
Correct Return Value: No
Answer check result:
Result must be not null.
Execution Time: 0.017s
Peak memory used: 24.551MB
abnormal termination (exit 1)
On Fri, May 30, 2014 at 11:06 PM, Ritwik Raghav
wrote:
> That's all the code I'm writing.
>
That can't be true - the 11 lines of code you posted doesn't include
anything that would give you "Correct Return Value: No", let alone any
reference to PersistentNumber. From the error message, it would
That's all the code I'm writing. The complete problem statement is:
http://pastebin.com/E970qYXk
On Sat, May 31, 2014 at 11:25 AM, Marc Tompkins
wrote:
> On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav
> wrote:
>
>
>> It has again given some error I do not understand. This time my code is:
>>
On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav
wrote:
> It has again given some error I do not understand. This time my code is:
>
> count = 0
> def getPersistence(self,n):
>
> product = 1
> if len(str(n)) == 1:
> return self.count
> else:
> a = str(n)
> for
Peter Otten wrote:
>Ritwik Raghav wrote:
>
>> I joined the topcoder community tomorrow and tried solving the
>> PersistentNumber problem:
>> "Given a number x, we can define p(x) as the product of the digits of x.
>> We can then form a sequence x, p(x), p(p(x))... The persistence of x is
>> then d
Alan Gauld wrote:
>On 30/05/14 14:14, Ritwik Raghav wrote:
>> I joined the topcoder community tomorrow and tried solving the
>> PersistentNumber problem:
>
>Time travel! I love it already... :-)
>
>> 8*1 = 8. Thus, the persistence of 99 is 2. You will be given n, and you
> >must return its persist
Ritwik Raghav wrote:
> I joined the topcoder community tomorrow and tried solving the
> PersistentNumber problem:
> "Given a number x, we can define p(x) as the product of the digits of x.
> We can then form a sequence x, p(x), p(p(x))... The persistence of x is
> then defined as the index (0-base
On 30/05/14 14:14, Ritwik Raghav wrote:
I joined the topcoder community tomorrow and tried solving the
PersistentNumber problem:
Time travel! I love it already... :-)
8*1 = 8. Thus, the persistence of 99 is 2. You will be given n, and you
must return its persistence."
It asks to define a fun
I joined the topcoder community tomorrow and tried solving the
PersistentNumber problem:
"Given a number x, we can define p(x) as the product of the digits of x. We
can then form a sequence x, p(x), p(p(x))... The persistence of x is then
defined as the index (0-based) of the first single digit num
10 matches
Mail list logo