From c22dc502b3fbe849e1b684877fd3eb8c8cc6fb75 Mon Sep 17 00:00:00 2001 From: asdiadenpotatisen <69951589+asdiadenpotatisen@users.noreply.github.com> Date: Thu, 22 Oct 2020 13:40:31 +0800 Subject: [PATCH] Update t01primeshcflcm_findab1.py --- t01primeshcflcm_findab1.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t01primeshcflcm_findab1.py b/t01primeshcflcm_findab1.py index 16125bd..65ac211 100644 --- a/t01primeshcflcm_findab1.py +++ b/t01primeshcflcm_findab1.py @@ -1,2 +1,8 @@ # If a and b are integers such that a * b = 17, find the value of a + b. +num = 17 +a = 1 +for a in range(1, num): + b = num % a + if b == 0: + print("a: {}, b: {}, a+b: {}".format(a, b, a+b))