Description:
Locate a member of a set that is split into multiple subsets.
Syntax:
z(i,n) |
Divide a set of natural numbers into multiple subsets, the length of each is k, and find the subset in which the ith member is located |
z(i,k,n) |
Divide a set cointaining n members evenly into k subsets and find the subset in which the ith member is located |
Note:
For a set with a specified length, the sequence number of the to-be-located member should be within the length, i.e. i<=n.
Parameters:
i |
Integer; the sequence number of a member and i<=n |
k |
Integer; the length of a subset |
n |
An integer, which is the length of a set |
Return value:
Integer
Example:
z(13,5) |
3 |
z(13,5,19) |
4 |