\documentclass[a4paper,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[french]{babel}
\usepackage[a4paper,top=3.2cm,bottom=2cm,left=2cm,right=2cm]{geometry}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{fancyhdr}
\usepackage{qrcode}
\usepackage[table]{xcolor}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
% Puces nettes (babel-french remplace sinon la puce par un tiret « – » peu pro).
% Vaut pour TOUTES les fiches qui importent ce module. AtBeginDocument pour
% passer après la personnalisation des listes faite par babel-french.
\AtBeginDocument{%
  \setlist[itemize]{leftmargin=1.8em,itemsep=0.5ex,topsep=0.4ex,parsep=0pt}%
  \setlist[itemize,1]{label=\textcolor{red!75!black}{\small\textbullet}}%
  \setlist[itemize,2]{label=\textcolor{red!75!black}{\scriptsize\textbullet}}%
}
% Titres compacts (gain de place vertical, fiches plus denses) — vaut pour tous.
\usepackage{titlesec}
\titlespacing*{\section}{0pt}{1.4ex}{0.6ex}
\titlespacing*{\subsection}{0pt}{1.0ex}{0.3ex}
% multicol : listes denses (calcul mental) sur 2 colonnes — neutre tant qu'il
% n'est pas utilisé, dispo pour tous les générateurs.
\usepackage{multicol}
\setlength{\columnsep}{1.5em}
% needspace : empêche un titre d'exercice de rester orphelin en bas de page
% (réserve quelques lignes ; sinon le titre passe à la page suivante avec sa
% liste). Neutre tant qu'il n'est pas appelé — dispo pour tous les générateurs.
\usepackage{needspace}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\usepackage{tgheros}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{75pt}
\setlength{\headsep}{10pt}

\newcommand{\logowouf}{%
\begin{tikzpicture}[baseline={(current bounding box.center)},scale=0.55,
                    line cap=round,line join=round]
    \path[use as bounding box] (-2.20,-1.45) rectangle (2.20,2.20);
    \path[
        postaction={decorate},
        decoration={
            text along path,
            text={|\fontfamily{qhv}\bfseries\fontsize{9}{9}\selectfont|site2wouf.fr},
            text align={center},
            raise=0.03ex
        }
    ] (-1.29,0.48) arc[start angle=160,end angle=20,radius=1.29];
    \begin{scope}[xshift=-0.06cm]
        \fill[black] (-0.66,0.14) ellipse (0.21 and 0.31);
        \fill[black] ( 0.66,0.14) ellipse (0.21 and 0.31);
        \fill[black] (-0.23,0.49) ellipse (0.22 and 0.35);
        \fill[black] ( 0.23,0.49) ellipse (0.22 and 0.35);
        \fill[black]
            (0,-0.10)
            .. controls (-0.36,-0.02) and (-0.63,-0.24) .. (-0.58,-0.58)
            .. controls (-0.52,-0.93) and (-0.16,-1.12) .. (0,-0.90)
            .. controls (0.16,-1.12) and (0.52,-0.93) .. (0.58,-0.58)
            .. controls (0.63,-0.24) and (0.36,-0.02) .. (0,-0.10)
            -- cycle;
    \end{scope}
\end{tikzpicture}%
}

\definecolor{plum}{HTML}{DDA0DD}

\newcommand{\titre}{Produits et sommes d'entiers}
\newcommand{\soustitre}{Compléter les grilles par déduction logique}

\fancyhead[C]{%
\raisebox{4pt}{%
\begin{minipage}[c]{0.15\textwidth}
    \centering
    \logowouf
\end{minipage}
\begin{minipage}[c]{0.62\textwidth}
    \centering
    {\Large\bfseries \titre\par}
    {\small\color{gray} \soustitre}
\end{minipage}
\begin{minipage}[c]{0.21\textwidth}
    \centering
    \qrcode[height=1.5cm]{https://site2wouf.fr/problemes_entiers_somme_produit.php?x=280}\\[2pt]
    {\small\ttfamily\bfseries\color{red} SOMP0280}
\end{minipage}%
}
}

\begin{document}

\par\medskip{\large\bfseries\color{red} Activité avec les multiplications :}\par\medskip

Complète ce premier tableau avec des entiers naturels compris entre 1 et 9, sachant que :

\begin{itemize}
  \item Chaque nombre n'est utilisé qu'une seule fois 
  \item Les produits des nombres de chaque ligne et chaque colonne sont indiqués à l'extérieur du tableau
\end{itemize}

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {84};
  \node[font=\bfseries] at (1.380,0.386) {96};
  \node[font=\bfseries] at (2.300,0.386) {45};
  \node[font=\bfseries] at (-0.506,-0.460) {280};
  \node[font=\bfseries] at (-0.506,-1.380) {216};
  \node[font=\bfseries] at (-0.506,-2.300) {6};
\end{tikzpicture}\end{center}

\begin{center}\color{red}  Il y a 2 solutions ! \end{center}

\par\medskip{\large\bfseries\color{red}  Plus difficile , avec les additions : }\par\medskip
  

Complète ce second tableau avec des entiers naturels compris entre 1 et 9, sachant que :

 
\begin{itemize} 
  \item Chaque nombre n'est utilisé qu'une seule fois  
  \item Les sommes des nombres de chaque ligne et chaque colonne sont indiqués à l'extérieur du tableau 
\end{itemize}
 
\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
\end{tikzpicture}\end{center}

\begin{center}\color{red} Il y a 6 solutions !\end{center}

\newpage

{\Large\bfseries\color{red} Correction}\par\medskip
\par\medskip{\large\bfseries\color{red} Correction de l'activité, avec les multiplications !}\par\medskip

\par\smallskip{\bfseries Solution 1}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {84};
  \node[font=\bfseries] at (1.380,0.386) {96};
  \node[font=\bfseries] at (2.300,0.386) {45};
  \node[font=\bfseries] at (-0.506,-0.460) {280};
  \node at (0.460,-0.460) {7};
  \node at (1.380,-0.460) {8};
  \node at (2.300,-0.460) {5};
  \node[font=\bfseries] at (-0.506,-1.380) {216};
  \node at (0.460,-1.380) {4};
  \node at (1.380,-1.380) {6};
  \node at (2.300,-1.380) {9};
  \node[font=\bfseries] at (-0.506,-2.300) {6};
  \node at (0.460,-2.300) {3};
  \node at (1.380,-2.300) {2};
  \node at (2.300,-2.300) {1};
\end{tikzpicture}\end{center}

\par\smallskip{\bfseries Solution 2}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {84};
  \node[font=\bfseries] at (1.380,0.386) {96};
  \node[font=\bfseries] at (2.300,0.386) {45};
  \node[font=\bfseries] at (-0.506,-0.460) {280};
  \node at (0.460,-0.460) {7};
  \node at (1.380,-0.460) {8};
  \node at (2.300,-0.460) {5};
  \node[font=\bfseries] at (-0.506,-1.380) {216};
  \node at (0.460,-1.380) {6};
  \node at (1.380,-1.380) {4};
  \node at (2.300,-1.380) {9};
  \node[font=\bfseries] at (-0.506,-2.300) {6};
  \node at (0.460,-2.300) {2};
  \node at (1.380,-2.300) {3};
  \node at (2.300,-2.300) {1};
\end{tikzpicture}\end{center}

\par\medskip{\large\bfseries\color{red} Avec les additions ( C'était plus difficile !)}\par\medskip

\par\smallskip{\bfseries Solution 1}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node at (0.460,-0.460) {3};
  \node at (1.380,-0.460) {6};
  \node at (2.300,-0.460) {1};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node at (0.460,-1.380) {8};
  \node at (1.380,-1.380) {2};
  \node at (2.300,-1.380) {4};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
  \node at (0.460,-2.300) {9};
  \node at (1.380,-2.300) {7};
  \node at (2.300,-2.300) {5};
\end{tikzpicture}\end{center}

\par\smallskip{\bfseries Solution 2}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node at (0.460,-0.460) {3};
  \node at (1.380,-0.460) {5};
  \node at (2.300,-0.460) {2};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node at (0.460,-1.380) {9};
  \node at (1.380,-1.380) {4};
  \node at (2.300,-1.380) {1};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
  \node at (0.460,-2.300) {8};
  \node at (1.380,-2.300) {6};
  \node at (2.300,-2.300) {7};
\end{tikzpicture}\end{center}

\par\smallskip{\bfseries Solution 3}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node at (0.460,-0.460) {3};
  \node at (1.380,-0.460) {6};
  \node at (2.300,-0.460) {1};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node at (0.460,-1.380) {8};
  \node at (1.380,-1.380) {4};
  \node at (2.300,-1.380) {2};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
  \node at (0.460,-2.300) {9};
  \node at (1.380,-2.300) {5};
  \node at (2.300,-2.300) {7};
\end{tikzpicture}\end{center}

\par\smallskip{\bfseries Solution 4}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node at (0.460,-0.460) {4};
  \node at (1.380,-0.460) {5};
  \node at (2.300,-0.460) {1};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node at (0.460,-1.380) {9};
  \node at (1.380,-1.380) {2};
  \node at (2.300,-1.380) {3};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
  \node at (0.460,-2.300) {7};
  \node at (1.380,-2.300) {8};
  \node at (2.300,-2.300) {6};
\end{tikzpicture}\end{center}

\par\smallskip{\bfseries Solution 5}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node at (0.460,-0.460) {5};
  \node at (1.380,-0.460) {3};
  \node at (2.300,-0.460) {2};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node at (0.460,-1.380) {9};
  \node at (1.380,-1.380) {4};
  \node at (2.300,-1.380) {1};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
  \node at (0.460,-2.300) {6};
  \node at (1.380,-2.300) {8};
  \node at (2.300,-2.300) {7};
\end{tikzpicture}\end{center}

\par\smallskip{\bfseries Solution 6}\par\smallskip

\begin{center}\begin{tikzpicture}[line width=0.7pt]
  \fill[plum!35] (0,0) rectangle (2.760,-2.760);
  \draw[step=0.92cm] (0,0) grid (2.760,-2.760);
  \draw[line width=1pt] (0,0) rectangle (2.760,-2.760);
  \node[font=\bfseries] at (0.460,0.386) {20};
  \node[font=\bfseries] at (1.380,0.386) {15};
  \node[font=\bfseries] at (2.300,0.386) {10};
  \node[font=\bfseries] at (-0.506,-0.460) {10};
  \node at (0.460,-0.460) {5};
  \node at (1.380,-0.460) {4};
  \node at (2.300,-0.460) {1};
  \node[font=\bfseries] at (-0.506,-1.380) {14};
  \node at (0.460,-1.380) {9};
  \node at (1.380,-1.380) {3};
  \node at (2.300,-1.380) {2};
  \node[font=\bfseries] at (-0.506,-2.300) {21};
  \node at (0.460,-2.300) {6};
  \node at (1.380,-2.300) {8};
  \node at (2.300,-2.300) {7};
\end{tikzpicture}\end{center}
\end{document}
