def rotateMatrix(self , mat: List[List[int]], n: int) -> List[List[int]]:
# write code here
if n==0 or n==1:return mat
res=[[0 for i in range(n)] for j in range(n)]
for i in range(n):
for j in range(n):
res[j][n-1-i]=mat[i][j]
return res