iven an integer N denotes N×N matrix. Initially, each cell of matrix is empty. U r given K tasks. In each task, you are given a cell (i,j) where cell (i,j) represents
ith row and jth column of given matrix.
I/p format
O/p format
Print K space-separated integers denoting numberr of empty cells in matrix.
input1 = int(input('Enter space separated numbers: '))
N = input1.split()[0]
K = input1.split()[1]
j = 0
for i in range(N):
for k in range(K):
j = j + 1
print(j, end = ' ')
print()
Comments
Leave a comment