\documentclass[a4paper,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[a4paper,top=3.2cm,bottom=2cm,left=2cm,right=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{qrcode}
\usepackage[table]{xcolor}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{decorations.text,calc,patterns}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{diagbox}
\usepackage{pifont}
\usepackage{scratch3}
\usepackage[np]{numprint}
\usepackage{textcomp}
\usepackage{tgheros}

\newcommand{\euro}{\texteuro}
\newcommand{\vect}[1]{\overrightarrow{\,\mathstrut#1\,}}
\renewcommand{\theenumi}{\textbf{\arabic{enumi}}}
\renewcommand{\labelenumi}{\textbf{\theenumi.}}
\renewcommand{\theenumii}{\textbf{\alph{enumii}}}
\renewcommand{\labelenumii}{\textbf{\theenumii.}}
\providecommand{\degres}{\textdegree}
\providecommand{\up}[1]{\textsuperscript{#1}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}

\newcommand{\titre}{Brevet des collèges}
\newcommand{\soustitre}{Métropole Antilles-Guyane, 26 juin 2023}
\newcommand{\monurl}{https://site2wouf.fr}

\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}%
}

\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{84pt}
\setlength{\headsep}{10pt}
\renewcommand{\headrule}{{\color{gray!25}\hrule width\headwidth height\headrulewidth}}
\fancyhead[C]{%
\raisebox{4pt}{%
\begin{minipage}[c]{0.15\textwidth}\centering\logowouf\end{minipage}%
\begin{minipage}[c]{0.65\textwidth}\centering
    {\Large\bfseries \titre\par}{\small\color{gray} \soustitre}
\end{minipage}%
\begin{minipage}[c]{0.18\textwidth}\centering\qrcode[height=1.7cm]{\monurl}\end{minipage}%
}\\[4mm]}

\begin{document}
\setlength\parindent{0mm}

\begin{center}
{\Large\bfseries Diplôme national du brevet\\[4pt]
Métropole Antilles-Guyane, 26 juin 2023}
\end{center}

\vspace{3mm}
\begin{center}
\colorbox{gray!15}{\parbox{0.85\textwidth}{\centering\Large\bfseries CORRIGÉ DE L'ÉPREUVE}}
\end{center}

\bigskip

{\large \textbf{Exercice 1 : Lunettes de soleil \hfill 20 points}}

\medskip

\begin{center}
\begin{tabularx}{\linewidth}{|c|>{\centering\arraybackslash}m{3.5cm}|*{6}{>{\centering\arraybackslash}X|}} \hline
 & \textsf{A} & \textsf{B} & \textsf{C} & \textsf{D} & \textsf{E} & \textsf{F} & \textsf{G}\\ \hline
\textsf{1} & \textbf{Lunettes} & \textbf{Mod. 1} & \textbf{Mod. 2} & \textbf{Mod. 3} & \textbf{Mod. 4} & \textbf{Mod. 5} & \textbf{Total}\\ \hline
\textsf{2} & \textbf{Nb paires} & \np{1200} & 950 & 875 & 250 & 300 & \np{3575}\\ \hline
\textsf{3} & \textbf{Prix (\euro)} & 75 & 100 & 110 & 140 & 160 & \\ \hline
\end{tabularx}
\end{center}

\begin{enumerate}
\item Étendue~: $160 - 75 = 85$~\euro.
\item
    \begin{enumerate}
        \item Formule G2~: \texttt{=SOMME(B2:F2)}.
        \item Total~: $\np{1200} + 950 + 875 + 250 + 300 = \np{3575}$ paires.
    \end{enumerate}
\item
    \begin{enumerate}
        \item Recette totale~: $\np{1200} \times 75 + 950 \times 100 + 875 \times 110 + 250 \times 140 + 300 \times 160 = \np{364250}$~\euro.
        \item Prix moyen~: $\dfrac{\np{364250}}{\np{3575}} \approx 101{,}89$~\euro.
    \end{enumerate}
\end{enumerate}

\bigskip

{\large \textbf{Exercice 2 : Géométrie \hfill 20 points}}

\medskip

\begin{center}
\begin{tikzpicture}[x=7mm,y=7mm]
    \draw[line width=1pt] (0,0) node[below left]{C}--
        (12.6,0.) node[below right] {F}--
        (2.52,7.56) node[pos = 0.28, sloped]{|||} node[above]{A}--
        (0.,4.2)node[pos = 0.5, sloped]{||} node[above left]{B} --cycle node[pos = 0.5, sloped]{||}
        (0.,4.2) -- (7.,4.2)node[pos = 0.5, sloped]{|||} node[above right]{E} -- (7.,0.) node[below right]{D}
        (2.52,0.) node[below] {H} -- (2.52,7.56);
    \foreach \x/\y in {0/0 , 2.52/0, 6.6/0, 6.6/3.8, 0/3.8}
        \draw[shift={(\x,\y)}] (0,0) rectangle (0.4,0.4) ;
    \draw[shift={(2.52,7.56)},rotate=143.13] (0,0) rectangle (-0.4,0.4) ;
\end{tikzpicture}
\end{center}

On donne AB = BC = 4,2~cm et EB = EF = 7~cm.

\begin{enumerate}
\item $\mathcal{A}(\text{BCDE}) = \text{BC} \times \text{EB} = 4{,}2 \times 7 = 29{,}4$~cm$^2$.
\item
    \begin{enumerate}
        \item Pythagore dans ABE rectangle en A~: $\text{AE}^2 = \text{BE}^2 - \text{AB}^2 = 49 - 17{,}64 = 31{,}36$, d'où AE $= 5{,}6$~cm.
        \item $\mathcal{A}(\triangle \text{ABE}) = \dfrac{4{,}2 \times 5{,}6}{2} = 11{,}76$~cm$^2$.
    \end{enumerate}
\item
    \begin{enumerate}
        \item (AH) $\perp$ (FH) et (ED) $\perp$ (FH) selon le codage : deux droites perpendiculaires à une même droite sont parallèles.
        \item FA = FE + EA $= 7 + 5{,}6 = 12{,}6$~cm. Thalès~: $\dfrac{7}{12{,}6} = \dfrac{4{,}2}{\text{AH}}$, d'où $\text{AH} = \dfrac{4{,}2 \times 12{,}6}{7} = 7{,}56$~cm.
    \end{enumerate}
\end{enumerate}

\bigskip

{\large \textbf{Exercice 3 : QCM \hfill 20 points}}

\medskip

\begin{enumerate}
\item $25 \times 0{,}6 = 15$ filles. Réponse \textbf{B}.
\item $126 = 2 \times 3^2 \times 7$. Réponse \textbf{C}.
\item $p = \dfrac{17+23}{60} = \dfrac{40}{60} = \dfrac{2}{3}$. Réponse \textbf{A}.
\item Rotation de $3 \times 45\degres = 135\degres$ (D → G, C → F) : [DC] a pour image [GF]. Réponse \textbf{B}.
\item $2 \times 1{,}5 \times 1{,}3 = 3{,}9$~m$^3 = 3900$~L. Réponse \textbf{B}.
\end{enumerate}

\bigskip

{\large \textbf{Exercice 4 : Escalier \hfill 20 points}}

\medskip

\begin{enumerate}
\item
    \begin{enumerate}
        \item $\dfrac{272}{17} = 16$ marches.
        \item $16 \times 27 = 432$~cm.
    \end{enumerate}
\item
    \begin{enumerate}
        \item $\tan\widehat{\text{BAC}} = \dfrac{272}{432} \approx 0{,}6296$, d'où $\widehat{\text{BAC}} \approx 32\degres$.
        \item $25 < 32 < 40$ : montée agréable. $\checkmark$
    \end{enumerate}
\item Lignes complétées du script~:

\begin{scratch}[num blocks]
\blockinit{Quand \greenflag{} est cliqué}
\blockmove{s'orienter à \ovalnum{90} degrés}
\blockpen{effacer tout}
\blockpen{stylo en position d'écriture}
\blockrepeat{répéter \ovalnum{16} fois}{
\blockmove{tourner \turnleft{} de \ovalnum{90} degrés}
\blockmove{avancer de \ovalnum{17} pas}
\blockmove{tourner \turnright{} de \ovalnum{90} degrés}
\blockmove{avancer de \ovalnum{27} pas}
}
\end{scratch}
\end{enumerate}

\bigskip

{\large \textbf{Exercice 5 : Programmes de calcul et fonctions \hfill 20 points}}

\medskip

\begin{enumerate}
\item
    \begin{enumerate}
        \item Programme A avec $-3$~: $(-3) \times (-2) + 5 = 6 + 5 = 11$.
        \item Programme B avec $5{,}5$~: $(5{,}5 - 5) \times 3 + 11 = 1{,}5 + 11 = 12{,}5$.
    \end{enumerate}
\item Programme B avec $x$~: $x \to x - 5 \to 3(x-5) \to 3(x-5) + 11 = 3x - 15 + 11 = 3x - 4$.

\begin{minipage}{0.52\linewidth}
\begin{enumerate}[resume]
\item
    \begin{enumerate}
        \item $g(x) = 3x - 4$ est croissante (coefficient $+3 > 0$) : c'est $(D_1)$.

$f(x) = -2x + 5$ est décroissante : c'est $(D_2)$.
        \item Par lecture graphique~: $x \approx 1{,}8$.
    \end{enumerate}
\item $-2x + 5 = 3x - 4 \iff 9 = 5x \iff x = 1{,}8$.
\end{enumerate}
\end{minipage}\hfill
\begin{minipage}{0.44\linewidth}
\begin{tikzpicture}[x=1cm,y=0.7cm]
    \draw[step=1,gray!30,thin] (-1,-4) grid (5,7);
    \draw[line width=1.25pt,->] (-1.1,0) -- (5.2,0) node[right,font=\scriptsize] {$x$};
    \draw[line width=1.25pt,->] (0,-4.2) -- (0,7.2);
    \foreach \x in {-1,1,2,3,4,5} {
        \draw (\x,0.1) -- (\x,-0.1);
        \node[below,font=\tiny] at (\x,-0.15) {\x};
    }
    \foreach \y in {-4,-3,-2,-1,1,2,3,4,5,6,7} {
        \draw (0.08,\y) -- (-0.08,\y);
        \node[left,font=\tiny] at (-0.1,\y) {\y};
    }
    \draw[line width=1.25pt,domain=-1:{11/5},samples=2] plot (\x,{3*\x-4});
    \draw[line width=1.25pt,domain=-1:{11/5},samples=2] plot (\x,{-2*\x+5});
    \draw[line width=1.25pt,dashed,->,>=stealth] (0,1.4) -- (1.8,1.4) -- (1.8,0);
    \node[right,font=\scriptsize] at (3.3,5.9) {$(D_1)$};
    \node[right,font=\scriptsize] at (2,1.0) {$(D_2)$};
\end{tikzpicture}
\end{minipage}
\end{enumerate}

\end{document}
