def permutation(n: int, r: int) -> int:
    """
    Returns the permutation i.e nPr of given 
    n and r
    >>> permutation(5,3)
    60
    """
    # If either n or r is 0, nPr = 1
    if n == 0 or r == 0:
        return 1

    # Initializing varibales
    nFac = 1
    nrFac = 1

    # A single for loop to compute both required values
    for i in range(1, n+1):
        nFac *= i
        if i == (n-r):
            nrFac = nFac

    return nFac//nrFac