Hello All,
Sorry for the earlier mail without subject. I was in a hurry so I missed that
I am solving problem number 5 in project euler. I think my solution seems
logically correct but it is not giving an answer as it is taking too long to
execute. So can someone suggest an alternative solution
On Tue, Aug 13, 2013 at 8:59 AM, Amit Saha wrote:
> What does it mean (and will it always work?) when I don't specify any
> encoding:
>
> >>> bytearray(ssid).decode()
> u'BigPond679D85'
>
If you don't specify an encoding, then the default encoding is used; as you
point out a bit later, your loc
Hello All,
I am solving problem number 5 in project euler. I think my solution seems
logically correct but it is not giving an answer as it is taking too long to
execute. So can someone suggest an alternative solution? Here is my source code:
import sys
def check(num):
lis=[20,19,18,17,16,14,
On Tue, Aug 13, 2013 at 9:45 AM, #PATHANGI JANARDHANAN JATINSHRAVAN# <
jatinshr...@e.ntu.edu.sg> wrote:
> Hello All,
>
> Sorry for the earlier mail without subject. I was in a hurry so I missed
> that
>
> I am solving problem number 5 in project euler. I think my solution
> seems logically corre
On 13/08/13 17:45, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
def check(num):
lis=[20,19,18,17,16,14,13,11] #because a no. divisible by 20 is
for i in lis:
if num%i==0:
continue
else:
return False
break
return True
This is a bit convoluted. All you nee
On 13/08/13 18:19, Alan Gauld wrote:
On 13/08/13 17:45, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
def check(num):
lis=[20,19,18,17,16,14,13,11] #because a no. divisible by 20 is
for i in lis:
if num%i==0:
continue
else:
return False
break
return True
On Aug 13, 2013 7:21 PM, "Peter Otten" <__pete...@web.de> wrote:
>
> Peter Otten wrote:
>
> > I'll post a naive implementation of that idea in a follow-up.
>
> So there:
>
> def gcd(a, b):
> if a == b:
> return a
> elif a > b:
> return gcd(a-b, b)
> else:
> retur
On 14/08/13 02:49, Marc Tompkins wrote:
On Tue, Aug 13, 2013 at 8:59 AM, Amit Saha wrote:
What does it mean (and will it always work?) when I don't specify any
encoding:
bytearray(ssid).decode()
u'BigPond679D85'
If you don't specify an encoding, then the default encoding is used; as you