Fucking cheaters. Bram, did you code it? I did it in my head. That's why it's called a "puzzle" and not a "coding problem".
E On Thu, 28 Feb 2002, John Hunter wrote: > > Nice! You got it about 3 times more quickly than I did. > > Hey, I did it in 0.526 sec (do I have to count coding time?) > > > def is_divisible(x,i): > v = x/float(i) > return v==int(v) > > def sum(x): > val = 0 > for i in x: > val += i > return val > > def digits(n): > n = str(n) > digits = [] > for char in n: > digits.append(int(char)) > return digits > > > i = 0 > done = 0 > divisor = 17 > while (not done): > if is_divisible(sum(digits(i)),divisor) and >is_divisible(sum(digits(i+1)),divisor): > print (i,i+1) > done = 1 > i = i+1 > > > > > _______________________________________________ > Bits mailing list > [EMAIL PROTECTED] > http://www.sugoi.org/mailman/listinfo/bits > -- Erik Curiel almost web-engineer/would-be philosopher "God loves all his children, by gum. That don't mean he won't incinerate some. Can't you feel those hot flames licking you-hoo, woo-hoo-hoo-hoo?" ---Austin Lounge Lizards, "Jesus Loves Me, but He Can't Stand You" _______________________________________________ Bits mailing list [EMAIL PROTECTED] http://www.sugoi.org/mailman/listinfo/bits
