day1/exercise/arm.py
author Nishanth Amuluru <nishanth@fossee.in>
Tue, 14 Dec 2010 23:12:25 +0530
branchscipyin2010
changeset 455 84b7a3f4a15a
parent 425 5afcfce15e71
permissions -rw-r--r--
updated the checklist to suit new circulate

cubes = []
for i in range(10):
    cubes.append(i ** 3)

for i in range(100, 1000):
    ones = i % 10
    tens = (i / 10) % 10
    hundreds = (i / 100) % 10
    if i == cubes[ones] + cubes[tens] + cubes[hundreds]:
        print "Armstrong Number: ", i