% CANSG5
\xintFor* #1 in{\xintSeq{1}{\useKV[ClesMathAlea]{NbQ}}}\do{%
  \ChoixAlea{2}{6}{\CANSGCinqTermeUn}%
  \ChoixAlea{3}{5}{\CANSGCinqPartageUn}%
  \ChoixAlea{2}{4}{\CANSGCinqPartageDeux}%
  \xdef\CANSGFoo{}%
  \foreachitem\compteur\in\ListeSommetsCAN{%
    \xdef\CANSGFoo{\CANSGFoo \ListeSommetsCAN[\compteurcnt],}%
  }%
  \MelangeListe{\CANSGFoo}{6}%
  \readlist*\ListeSommetsMelanges{\faa}%
  {\em La figure est donnée à titre indicatif.}\par Sachant que $\ListeSommetsMelanges[1]\ListeSommetsMelanges[2]=\Lg{\fpeval{\CANSGCinqTermeUn*\CANSGCinqPartageUn*\CANSGCinqPartageDeux}}$ et que $\ListeSommetsMelanges[3]\ListeSommetsMelanges[2]=\ListeSommetsMelanges[4]\ListeSommetsMelanges[5]$, détermine la longueur $\ListeSommetsMelanges[5]\ListeSommetsMelanges[6]$.
  \begin{center}
    \begin{Geometrie}[CoinBG={u*(-2,-2)},CoinHD={u*(17,5)}]
      u:=(\mpdim{\linewidth}/(0.6cm));
      pair A,B,C,D,E,F,M[],N[];
      A=u*(0.5,0.5);
      B-A=2*u*(4+uniformdeviate(4),0);
      C=(1/\CANSGCinqPartageDeux)[B,A];
      D-C=u*(0,1.5);
      E-D=B-C;
      F=(1/\CANSGCinqPartageUn)[E,D];
      for k=0 upto (\CANSGCinqPartageDeux):
      M[k]=(k/\CANSGCinqPartageDeux)[A,B];
      trace (u*(0,-0.075)--u*(0,0.075)) shifted M[k];
      endfor;
      for k=0 upto (\CANSGCinqPartageUn):
      N[k]=(k/\CANSGCinqPartageUn)[D,E];
      trace (u*(0,-0.075)--u*(0,0.075)) shifted N[k];
      endfor;
      trace segment(A,B);
      trace segment(D,E);
      trace segment(D,C) dashed evenly;
      trace segment(E,B) dashed evenly;
      marque_s:=marque_s/3;
      for k=0 upto (\CANSGCinqPartageDeux-1):
      trace Codelongueur(M[k],M[k+1],2);
      endfor;
      for k=0 upto (\CANSGCinqPartageUn-1):
      trace Codelongueur(N[k],N[k+1],5);
      endfor;
      marque_s:=marque_s*3;
      label.bot(btex \ListeSommetsMelanges[1] etex,A);
      label.bot(btex \ListeSommetsMelanges[2] etex,B);
      label.bot(btex \ListeSommetsMelanges[3] etex,C);
      label.top(btex \ListeSommetsMelanges[4] etex,D);
      label.top(btex \ListeSommetsMelanges[5] etex,E);
      label.top(btex \ListeSommetsMelanges[6] etex,F);
    \end{Geometrie}
  \end{center}
}
\ifboolKV[ClesCN]{AMC}{
  \ifboolKV[ClesCN]{Multi}{%
    \AMCnumericChoices{\fpeval{\CANSGCinqTermeUn}}{digits=3,decimals=0,sign=false,Tpoint={,},borderwidth=0pt,backgroundcol=lightgray,scoreexact=1}
  }{%
    \begin{reponseshoriz}
      \bonne{\Lg{\CANSGCinqTermeUn}}
      \mauvaise{\Lg{\fpeval{\CANSGCinqTermeUn-1}}}
      \mauvaise{\Lg{\fpeval{\CANSGCinqTermeUn+1}}}
      \mauvaise{\Lg{\fpeval{\CANSGCinqTermeUn+2}}}
      \mauvaise{\Lg{\fpeval{\CANSGCinqPartageUn*\CANSGCinqPartageDeux}}}
    \end{reponseshoriz}
  }%
}{}%
