Programming Exercises

Find the HCF (Highest Common Factor) of two numbers.

Medium

Problem Statement

Find the HCF (Highest Common Factor) of two numbers.

Sample Input

8, 12

Sample Output

4

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
def find_hcf(): a, b = 8, 12 # Your code here return
Log in or sign up to run or submit your code.Log inSign up
Input
8, 12
Expected Output
4