matrix = [1,2,3,4,5,6,7, //7 1,2,3,4,5,6,7, //14 1,2,3,4,5,6,7, //21 0,0,0,0] //25 rand7(): while true: i = (rand5()-1)*5 + rand5()-1 if 0 <= i <= 20: return matrix[i]
No comments:
Post a Comment