Wednesday, September 24, 2008

Nokia Tube



I cant wait for this phone to come out. Rumors state Oct 2nd and usually Nokia usually doesnt disappoint. If only the N96 was close to $1200

Wednesday, July 09, 2008

its been ages, but here goes another attempt

is anyone really surprised by the early iphone reviews ?? I mean when the phone was announced it was pretty clear that other than gps and 3g there wasnt a whole lot that you could call new in this phone. Still doesnt mean I wont go buy one, but the samsung and sony are really looking appealing :)

Thursday, May 15, 2008

I need to revive this thing again ..... need more ideas though

Saturday, January 05, 2008

Project Euler 40

One more :)

This one was really easy. Also learnt a thing or two about string concatenations in python when my original techinique of k += str(someInt) was taking way to long as the length of the string increased.

Apparently when wanting to a large number of concatenation, its fast to append to an array and then do a join.

Problem #4o states:-
An irrational decimal fraction is created by concatenating the positive integers:

0.123456789101112131415161718192021...

It can be seen that the 12th digit of the fractional part is 1.

If dn represents the nth digit of the fractional part, find the value of the following expression.

d1 × d10 × d100 × d1000 × d10000 × d100000 × d1000000

Solution:-

import time
w = time.time()
d = ''.join([`num` for num in xrange(1,190000)])
print int(d[0])*int(d[9])*int(d[99])*int(d[999])*int(d[9999])*int(d[99999])*int(d[999999])
print time.time() - w