コード例 #1
0
ファイル: test_math_helper.py プロジェクト: h5b/python-dev
 def test_lcm_returns_15_given_args_3_and_5(self):
     assert_equal(lcm(3, 5), 15)
コード例 #2
0
ファイル: test_math_helper.py プロジェクト: h5b/python-dev
 def test_lcm_returns_6_given_args_3_and_6(self):
     assert_equal(lcm(3, 6), 6)
コード例 #3
0
ファイル: test_math_helper.py プロジェクト: h5b/python-dev
 def test_lcm_returns_6_given_args_6_and_3(self):
     assert_equal(lcm(6, 3), 6)
コード例 #4
0
ファイル: euler_problem_05.py プロジェクト: h5b/python-dev
def least_common_multiple_from_1_to(number):
    return reduce(lambda x, y: lcm(x, y), range(1, number + 1))