title: Improve my solution to PE 21?
body: <p>I solved the project euler <a href="http://projecteuler.net/problem=21" rel="nofollow">problem 21</a> using the following approach using python.</p>
  
  <pre><code>ans = 0;
  for i in range(1,10000):
      s = 0;
      su = 0;
      for j in range(1,i):
          if(i%j==0):
              s = s + j;
      if(i!=s):
  
          for k in range(1,s):
              if(s%k==0):
                  su = su+k;
          if(su == i):
              ans=ans+i;
              print(ans);
  </code></pre>
  
  <p>It took around 35 seconds. I was wondering whether there is a better approach. How can I improve my algorith</p>