app/site-content/proposals/2009/07/28/arm_.py
author Santosh G. Vattam <vattam.santosh@gmail.com>
Thu, 06 Aug 2009 18:49:06 +0530
changeset 7 3e6916eb3d2c
parent 0 c94bd9ae70d2
permissions -rwxr-xr-x
Added checkAccess routine
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
c94bd9ae70d2 First commit.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     1
for i in range(100, 1000):
c94bd9ae70d2 First commit.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     2
    a = i % 10
c94bd9ae70d2 First commit.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     3
    b = (i / 10) % 10
c94bd9ae70d2 First commit.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     4
    c = (i / 100) % 10
c94bd9ae70d2 First commit.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     5
    if i == a ** 3 + b ** 3 + c ** 3:
c94bd9ae70d2 First commit.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     6
        print "Armstrong Number: ", i