Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = int(input())
- matrix = [[((i < j and (i < N - 1 - j))) * 1 + ((i < j and (i > N - 1 - j))) * 2 + ((i > j and (i < N - 1 - j))) * 4 +
- ((i > j and (i > N - 1 - j))) * 3 for j in range(N)] for i in range(N)]
- for i in range(N):
- print(matrix[i])
Advertisement
Add Comment
Please, Sign In to add comment