from random import randint

def matadj(n):
    M = [ [0 for j in range(n)] for i in range(n) ]
    for ligne in range(n):
        for colonne in range(n):
            if colonne > ligne:
                M[ligne][colonne] = randint(0,1)
            elif colonne < ligne:
                M[ligne][colonne] = M[colonne][ligne]
    
    return M
