def testmaximum_collatz_under(self): self.assertEquals(1, problem014.maximum_collatz_under(1)) self.assertEquals(2, problem014.maximum_collatz_under(2)) self.assertEquals(3, problem014.maximum_collatz_under(3)) self.assertEquals(3, problem014.maximum_collatz_under(4)) self.assertEquals(7, problem014.maximum_collatz_under(7)) self.assertEquals(7, problem014.maximum_collatz_under(8)) self.assertEquals(9, problem014.maximum_collatz_under(9)) self.assertEquals(9, problem014.maximum_collatz_under(10))
#!/usr/bin/env python import sys import problem014 print(problem014.maximum_collatz_under(int(sys.argv[1])))