示例#1
0
 def testsum_of_primes_below(self):
     self.assertEquals(0, problem010.sum_of_primes_below(1))
     self.assertEquals(2, problem010.sum_of_primes_below(2))
     self.assertEquals(5, problem010.sum_of_primes_below(3))
     self.assertEquals(5, problem010.sum_of_primes_below(4))
     self.assertEquals(10, problem010.sum_of_primes_below(5))
     self.assertEquals(17, problem010.sum_of_primes_below(10))
示例#2
0
#!/usr/bin/env python

import sys

import problem010

print(problem010.sum_of_primes_below(int(sys.argv[1])))